aboutsummaryrefslogtreecommitdiff
path: root/src/comp/front/ast.rs
diff options
context:
space:
mode:
authorGraydon Hoare <[email protected]>2010-09-28 10:30:34 -0700
committerGraydon Hoare <[email protected]>2010-09-28 10:30:34 -0700
commitfbea4d04b7053e5885d2867f1519416458a37140 (patch)
tree3f649b21df47ba83f24651494b3389ca52ec5d46 /src/comp/front/ast.rs
parentStart building up the expression tower. (diff)
downloadrust-fbea4d04b7053e5885d2867f1519416458a37140.tar.xz
rust-fbea4d04b7053e5885d2867f1519416458a37140.zip
More rustc expr-parsing logic.
Diffstat (limited to 'src/comp/front/ast.rs')
-rw-r--r--src/comp/front/ast.rs30
1 files changed, 14 insertions, 16 deletions
diff --git a/src/comp/front/ast.rs b/src/comp/front/ast.rs
index d4e8aaaf..c74e1620 100644
--- a/src/comp/front/ast.rs
+++ b/src/comp/front/ast.rs
@@ -10,12 +10,14 @@ type crate = rec(_mod module);
type block = vec[@stmt];
tag binop {
- plus;
- minus;
- star;
- slash;
- percent;
- caret;
+ add;
+ sub;
+ mul;
+ div;
+ rem;
+ and;
+ or;
+ bitxor;
bitand;
bitor;
lsl;
@@ -30,11 +32,11 @@ tag binop {
}
tag unop {
+ box;
+ deref;
bitnot;
not;
neg;
- deref;
- cast(@ty);
}
tag stmt {
@@ -49,14 +51,7 @@ tag decl {
decl_item(ident, @item);
}
-tag lval {
- lval_ident(ident);
- lval_ext(@lval, ident);
- lval_idx(@lval, @expr);
-}
-
tag expr {
- expr_box(@expr);
expr_vec(vec[@expr]);
expr_tup(vec[@expr]);
expr_rec(vec[tup(ident,@expr)]);
@@ -64,7 +59,10 @@ tag expr {
expr_binary(binop, @expr, @expr);
expr_unary(unop, @expr);
expr_lit(@lit);
- expr_lval(@lval);
+ expr_ident(ident);
+ expr_field(@expr, ident);
+ expr_index(@expr, @expr);
+ expr_cast(@expr, ty);
}
tag lit {