aboutsummaryrefslogtreecommitdiff
path: root/src/comp/front/ast.rs
diff options
context:
space:
mode:
authorRafael Ávila de Espíndola <[email protected]>2010-12-30 11:21:37 -0500
committerRafael Ávila de Espíndola <[email protected]>2010-12-30 11:21:37 -0500
commit09ef31caa0c2eafb113198ad60445e8aebddbf2e (patch)
treead2e03b11bc6d0ada27821bba7257ca28466b7a5 /src/comp/front/ast.rs
parentMore mopping up wrong-named rules in the Makefile. (diff)
downloadrust-09ef31caa0c2eafb113198ad60445e8aebddbf2e.tar.xz
rust-09ef31caa0c2eafb113198ad60445e8aebddbf2e.zip
Record the ast of uses and imports.
Diffstat (limited to 'src/comp/front/ast.rs')
-rw-r--r--src/comp/front/ast.rs14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/comp/front/ast.rs b/src/comp/front/ast.rs
index 8159962d..aa28e7c4 100644
--- a/src/comp/front/ast.rs
+++ b/src/comp/front/ast.rs
@@ -39,6 +39,20 @@ tag def {
type crate = spanned[crate_];
type crate_ = rec(_mod module);
+type use_node = spanned[use_node_];
+type use_node_ = rec(ident name, vec[@meta_item] metadata);
+
+type import_node = spanned[import_node_];
+type import_node_ = rec(vec[ident] identifiers);
+
+tag use_or_import {
+ use_or_import_use(@use_node);
+ use_or_import_import(@import_node);
+}
+
+type meta_item = spanned[meta_item_];
+type meta_item_ = rec(ident name, str value);
+
type block = spanned[block_];
type block_ = rec(vec[@stmt] stmts,
option.t[@expr] expr,