From 7c8f99fdc1be0ed80095af160fffae2995cda83f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafael=20=C3=81vila=20de=20Esp=C3=ADndola?= Date: Tue, 4 Jan 2011 17:58:10 -0500 Subject: Add names from imports to the namespace. --- src/comp/front/parser.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/comp/front/parser.rs') diff --git a/src/comp/front/parser.rs b/src/comp/front/parser.rs index 8c3db0e1..f71fae61 100644 --- a/src/comp/front/parser.rs +++ b/src/comp/front/parser.rs @@ -1,4 +1,5 @@ import std._io; +import std._vec; import std.option; import std.option.some; import std.option.none; @@ -1751,10 +1752,12 @@ impure fn parse_view(parser p, ast.mod_index index) -> vec[@ast.view_item] { items += vec(item); alt (item.node) { case(ast.view_item_use(?id, _, _)) { - index.insert(id, ast.mie_use(u)); + index.insert(id, ast.mie_view_item(u)); } case(ast.view_item_import(?ids,_)) { - // FIXME + auto len = _vec.len[ast.ident](ids); + auto last_id = ids.(len - 1u); + index.insert(last_id, ast.mie_view_item(u)); } } u = u + 1u; -- cgit v1.2.3