diff options
| author | Brian Anderson <banderson@mozilla.com> | 2011-08-16 15:21:30 -0700 |
|---|---|---|
| committer | Brian Anderson <banderson@mozilla.com> | 2011-08-17 11:04:56 -0700 |
| commit | cd54e7772040cd268f911e9dfd088ad5f659f552 (patch) | |
| tree | d12ac71b3f3ec50fe345d8064c87f8a5b44a9010 /src/comp/syntax/print | |
| parent | c4ce463f3709c7a8a92941d2e4bfab6db5da550f (diff) | |
| download | rust-cd54e7772040cd268f911e9dfd088ad5f659f552.tar.gz rust-cd54e7772040cd268f911e9dfd088ad5f659f552.zip | |
Allow multiple imports in a single statement
Like so: import foo::{bar, baz};
Issue #817
Diffstat (limited to 'src/comp/syntax/print')
| -rw-r--r-- | src/comp/syntax/print/pprust.rs | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/comp/syntax/print/pprust.rs b/src/comp/syntax/print/pprust.rs index 43ab6c5c823..a8f694e6755 100644 --- a/src/comp/syntax/print/pprust.rs +++ b/src/comp/syntax/print/pprust.rs @@ -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; |
