diff options
| author | Graydon Hoare <[email protected]> | 2011-04-04 15:44:15 -0700 |
|---|---|---|
| committer | Graydon Hoare <[email protected]> | 2011-04-04 15:44:15 -0700 |
| commit | 70e5457d7c99d3b273c3ef9edaebee1324be85c7 (patch) | |
| tree | 215db03e8e982504f4b182b833140f2a6dcc6c0b /src/comp/front/ast.rs | |
| parent | Begin comparing vectors from the correct address (diff) | |
| download | rust-70e5457d7c99d3b273c3ef9edaebee1324be85c7.tar.xz rust-70e5457d7c99d3b273c3ef9edaebee1324be85c7.zip | |
Make box prefix operator and box type carry mutability flag.
Diffstat (limited to 'src/comp/front/ast.rs')
| -rw-r--r-- | src/comp/front/ast.rs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/comp/front/ast.rs b/src/comp/front/ast.rs index 46666a34..61450a1b 100644 --- a/src/comp/front/ast.rs +++ b/src/comp/front/ast.rs @@ -188,7 +188,7 @@ fn binop_to_str(binop op) -> str { tag unop { - box; + box(mutability); deref; bitnot; not; @@ -197,7 +197,10 @@ tag unop { fn unop_to_str(unop op) -> str { alt (op) { - case (box) {ret "@";} + case (box(?mt)) { + if (mt == mut) { ret "@mutable"; } + ret "@"; + } case (deref) {ret "*";} case (bitnot) {ret "~";} case (not) {ret "!";} |