From c6482c00834af5df92233e4af7e1714b7e97ce80 Mon Sep 17 00:00:00 2001 From: Brian Anderson Date: Tue, 16 Aug 2011 14:22:07 -0700 Subject: [PATCH] Refactor ast::view_item to differentiate between [ident]s and paths --- src/comp/syntax/ast.rs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/comp/syntax/ast.rs b/src/comp/syntax/ast.rs index ec63af65729..b286fdaf484 100644 --- a/src/comp/syntax/ast.rs +++ b/src/comp/syntax/ast.rs @@ -560,10 +560,14 @@ fn ty_mach_to_str(tm: ty_mach) -> str { type view_item = spanned; +// FIXME: May want to just use path here, which would allow things like +// 'import ::foo' +type simple_path = [ident]; + tag view_item_ { view_item_use(ident, [@meta_item], node_id); - view_item_import(ident, [ident], node_id); - view_item_import_glob([ident], node_id); + view_item_import(ident, simple_path, node_id); + view_item_import_glob(simple_path, node_id); view_item_export([ident], node_id); }