aboutsummaryrefslogtreecommitdiff
path: root/src/comp/front/parser.rs
diff options
context:
space:
mode:
authorGraydon Hoare <[email protected]>2011-01-04 15:07:38 -0800
committerGraydon Hoare <[email protected]>2011-01-04 15:07:38 -0800
commit2ec0b724c46073d57973e076e222b047e36fee9d (patch)
treec59e8d97328e8b19885ef9db232cc57efd3a2de5 /src/comp/front/parser.rs
parentrustc: Add an item type accessor (diff)
parentAdd names from imports to the namespace. (diff)
downloadrust-2ec0b724c46073d57973e076e222b047e36fee9d.tar.xz
rust-2ec0b724c46073d57973e076e222b047e36fee9d.zip
Merge remote branch 'espindola/import'
Diffstat (limited to 'src/comp/front/parser.rs')
-rw-r--r--src/comp/front/parser.rs7
1 files changed, 5 insertions, 2 deletions
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;