aboutsummaryrefslogtreecommitdiff
path: root/src/comp/fe/ast.rs
diff options
context:
space:
mode:
authorGraydon Hoare <[email protected]>2010-09-01 13:24:14 -0700
committerGraydon Hoare <[email protected]>2010-09-01 13:24:14 -0700
commiteb90be779877caa2e2d51095301f83695d77dd44 (patch)
tree76756b9fa7e4cfc6284632b7cde93302d87348c4 /src/comp/fe/ast.rs
parentWhitespace churn. (diff)
downloadrust-eb90be779877caa2e2d51095301f83695d77dd44.tar.xz
rust-eb90be779877caa2e2d51095301f83695d77dd44.zip
Add session, span tracking, error reporting, beginning of a function to parse an item to rustc.
Diffstat (limited to 'src/comp/fe/ast.rs')
-rw-r--r--src/comp/fe/ast.rs7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/comp/fe/ast.rs b/src/comp/fe/ast.rs
index 3a329ded..ba084979 100644
--- a/src/comp/fe/ast.rs
+++ b/src/comp/fe/ast.rs
@@ -1,13 +1,14 @@
import std.util.option;
import std.map.hashmap;
+import util.common.span;
type ident = str;
type crate = rec( str filename,
_mod module);
-type block = vec[stmt];
+type block = vec[@stmt];
type stmt = tag( stmt_block(block),
stmt_decl(@decl),
@@ -20,7 +21,7 @@ type lval = tag( lval_ident(ident),
lval_ext(@lval, ident),
lval_idx(@lval, @atom) );
-type atom = tag( atom_lit(lit));
+type atom = tag( atom_lit(@lit), atom_lval(@lval) );
type lit = tag( lit_char(char),
lit_int(int),
@@ -32,7 +33,7 @@ type ty = tag( ty_nil(),
ty_int(),
ty_char() );
-type mode = tag( local(), alias() );
+type mode = tag( val(), alias() );
type slot = rec(ty ty, mode mode);