diff options
| author | Patrick Walton <[email protected]> | 2010-10-19 13:10:39 -0700 |
|---|---|---|
| committer | Patrick Walton <[email protected]> | 2010-10-19 13:10:39 -0700 |
| commit | e497fe981b03d44591d87c234c63b69e62ecf747 (patch) | |
| tree | 4f01f36566f477d0eb0e516f2803c18ec5937546 /src/comp/front | |
| parent | Store items and decls in vecs to preserve input order, index externally. Impl... (diff) | |
| download | rust-e497fe981b03d44591d87c234c63b69e62ecf747.tar.xz rust-e497fe981b03d44591d87c234c63b69e62ecf747.zip | |
Partial work on adding types to the AST
Diffstat (limited to 'src/comp/front')
| -rw-r--r-- | src/comp/front/ast.rs | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/src/comp/front/ast.rs b/src/comp/front/ast.rs index 047bdd06..e2dcf159 100644 --- a/src/comp/front/ast.rs +++ b/src/comp/front/ast.rs @@ -84,20 +84,20 @@ tag decl_ { type expr = spanned[expr_]; tag expr_ { - expr_vec(vec[@expr]); - expr_tup(vec[tup(bool /* mutability */, @expr)]); - expr_rec(vec[tup(ident,@expr)]); - expr_call(@expr, vec[@expr]); - expr_binary(binop, @expr, @expr); - expr_unary(unop, @expr); - expr_lit(@lit); + expr_vec(vec[@expr], option[@ty]); + expr_tup(vec[tup(bool /* mutability */, @expr)], option[@ty]); + expr_rec(vec[tup(ident,@expr)], option[@ty]); + expr_call(@expr, vec[@expr], option[@ty]); + expr_binary(binop, @expr, @expr, option[@ty]); + expr_unary(unop, @expr, option[@ty]); + expr_lit(@lit, option[@ty]); expr_cast(@expr, @ty); - expr_if(@expr, block, option[block]); - expr_block(block); - expr_assign(@expr /* TODO: @expr : is_lval(@expr) */, @expr); - expr_field(@expr, ident); - expr_index(@expr, @expr); - expr_name(name, option[def]); + expr_if(@expr, block, option[block], option[@ty]); + expr_block(block, option[@ty]); + expr_assign(@expr /* TODO: @expr|is_lval */, @expr, option[@ty]); + expr_field(@expr, ident, option[@ty]); + expr_index(@expr, @expr, option[@ty]); + expr_name(name, option[def], option[@ty]); } type lit = spanned[lit_]; |