diff options
| author | Graydon Hoare <[email protected]> | 2010-11-29 14:18:26 -0800 |
|---|---|---|
| committer | Graydon Hoare <[email protected]> | 2010-11-29 14:18:26 -0800 |
| commit | 386f363cfea72899fa3c3f2a194d00819cdbe806 (patch) | |
| tree | 824eda78ba43562d964a78c62aa7e0c6d58873e8 /src/comp/front/ast.rs | |
| parent | Add ast.ty_mutable. (diff) | |
| download | rust-386f363cfea72899fa3c3f2a194d00819cdbe806.tar.xz rust-386f363cfea72899fa3c3f2a194d00819cdbe806.zip | |
Change from bool to tag ast.mutability.
Diffstat (limited to 'src/comp/front/ast.rs')
| -rw-r--r-- | src/comp/front/ast.rs | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/comp/front/ast.rs b/src/comp/front/ast.rs index a177f301..5e34d481 100644 --- a/src/comp/front/ast.rs +++ b/src/comp/front/ast.rs @@ -48,6 +48,11 @@ tag pat_ { pat_tag(ident, vec[@pat], ann); } +tag mutability { + mut; + imm; +} + tag binop { add; sub; @@ -105,7 +110,7 @@ type arm = rec(@pat pat, block block); type expr = spanned[expr_]; tag expr_ { expr_vec(vec[@expr], ann); - expr_tup(vec[tup(bool /* mutability */, @expr)], ann); + expr_tup(vec[tup(mutability, @expr)], ann); expr_rec(vec[tup(ident,@expr)], ann); expr_call(@expr, vec[@expr], ann); expr_binary(binop, @expr, @expr, ann); @@ -147,7 +152,7 @@ tag ty_ { ty_str; ty_box(@ty); ty_vec(@ty); - ty_tup(vec[tup(bool /* mutability */, @ty)]); + ty_tup(vec[tup(mutability, @ty)]); ty_fn(vec[rec(mode mode, @ty ty)], @ty); // TODO: effect ty_path(path, option.t[def]); ty_mutable(@ty); |