Allow multiple imports in a single statement

Like so: import foo::{bar, baz};

Issue #817
This commit is contained in:
Brian Anderson 2011-08-16 15:21:30 -07:00
parent c4ce463f37
commit cd54e77720
10 changed files with 155 additions and 3 deletions

View file

@ -1267,6 +1267,19 @@ fn print_view_item(s: &ps, item: &@ast::view_item) {
word(s.s, elt);
}
}
ast::view_item_import_from(mod_path, idents, _) {
head(s, "import");
for elt: str in mod_path {
word(s.s, elt);
word(s.s, "::");
}
word(s.s, "{");
commasep(s, inconsistent, idents,
fn(s: &ps, w: &ast::import_ident) {
word(s.s, w.node.name)
});
word(s.s, "}");
}
ast::view_item_import_glob(ids, _) {
head(s, "import");
let first = true;