aboutsummaryrefslogtreecommitdiff
path: root/src/comp/fe/ast.rs
diff options
context:
space:
mode:
authorGraydon Hoare <[email protected]>2010-09-21 16:22:32 -0700
committerGraydon Hoare <[email protected]>2010-09-21 16:22:32 -0700
commit1f0621d04ee9d938ba7d07df76837b86f43c6158 (patch)
tree85c1a6034f9858156d6188d1690abb68cb128d36 /src/comp/fe/ast.rs
parentAdd insn-selection fixup-name logging. (diff)
downloadrust-1f0621d04ee9d938ba7d07df76837b86f43c6158.tar.xz
rust-1f0621d04ee9d938ba7d07df76837b86f43c6158.zip
Begin teaching rustc to parse literals, atoms, stmts, blocks, items, modules, crates.
Diffstat (limited to 'src/comp/fe/ast.rs')
-rw-r--r--src/comp/fe/ast.rs9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/comp/fe/ast.rs b/src/comp/fe/ast.rs
index dcea02de..327570d6 100644
--- a/src/comp/fe/ast.rs
+++ b/src/comp/fe/ast.rs
@@ -5,8 +5,7 @@ import util.common.span;
type ident = str;
-type crate = rec( str filename,
- _mod module);
+type crate = rec(_mod module);
type block = vec[@stmt];
@@ -14,6 +13,7 @@ tag stmt {
stmt_block(block);
stmt_decl(@decl);
stmt_ret(option[@lval]);
+ stmt_log(@atom);
}
@@ -36,6 +36,7 @@ tag atom {
tag lit {
lit_char(char);
lit_int(int);
+ lit_uint(uint);
lit_nil;
lit_bool(bool);
}
@@ -44,7 +45,11 @@ tag ty {
ty_nil;
ty_bool;
ty_int;
+ ty_uint;
+ ty_machine(util.common.ty_mach);
ty_char;
+ ty_str;
+ ty_box(@ty);
}
tag mode {