aboutsummaryrefslogtreecommitdiff
path: root/src/comp/front/ast.rs
diff options
context:
space:
mode:
authorGraydon Hoare <[email protected]>2010-10-04 15:55:12 -0700
committerGraydon Hoare <[email protected]>2010-10-04 15:55:12 -0700
commit44e4b2d63aef1e6cb572acfa327ea2c3a36083e8 (patch)
treed48f06f491e20d4f176c7e1435ba953ec549d72c /src/comp/front/ast.rs
parentSupport refcount-drop and conditional free in rustc. (diff)
downloadrust-44e4b2d63aef1e6cb572acfa327ea2c3a36083e8.tar.xz
rust-44e4b2d63aef1e6cb572acfa327ea2c3a36083e8.zip
Teach rustc about phi nodes, block relationships. Translate if- and block-expressions.
Diffstat (limited to 'src/comp/front/ast.rs')
-rw-r--r--src/comp/front/ast.rs9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/comp/front/ast.rs b/src/comp/front/ast.rs
index c74e1620..48ba9187 100644
--- a/src/comp/front/ast.rs
+++ b/src/comp/front/ast.rs
@@ -1,7 +1,10 @@
-import std.util.option;
+import util.common.option;
import std.map.hashmap;
import util.common.span;
+import util.common.option;
+import util.common.some;
+import util.common.none;
type ident = str;
@@ -40,10 +43,10 @@ tag unop {
}
tag stmt {
- stmt_block(block);
stmt_decl(@decl);
stmt_ret(option[@expr]);
stmt_log(@expr);
+ stmt_expr(@expr);
}
tag decl {
@@ -63,6 +66,8 @@ tag expr {
expr_field(@expr, ident);
expr_index(@expr, @expr);
expr_cast(@expr, ty);
+ expr_if(@expr, block, option[block]);
+ expr_block(block);
}
tag lit {