From 9e4943c9229e15fa11069eeb2b20060994f9ac0f Mon Sep 17 00:00:00 2001 From: Graydon Hoare Date: Wed, 2 Mar 2011 13:50:42 -0800 Subject: Parse, add to AST, and otherwise ignore 'export' view items. Need to add support to resolve. --- src/comp/front/ast.rs | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/comp/front/ast.rs') diff --git a/src/comp/front/ast.rs b/src/comp/front/ast.rs index 46f57168..474dc4aa 100644 --- a/src/comp/front/ast.rs +++ b/src/comp/front/ast.rs @@ -279,6 +279,7 @@ type view_item = spanned[view_item_]; tag view_item_ { view_item_use(ident, vec[@meta_item], def_id); view_item_import(ident, vec[ident], def_id, option.t[def]); + view_item_export(ident); } type item = spanned[item_]; @@ -306,6 +307,11 @@ fn index_view_item(mod_index index, @view_item it) { case(ast.view_item_import(?def_ident,_,_,_)) { index.insert(def_ident, ast.mie_view_item(it)); } + case(ast.view_item_export(_)) { + // NB: don't index these, they might collide with + // the import or use that they're exporting. Have + // to do linear search for exports. + } } } -- cgit v1.2.3