summary refs log tree commit diff
path: root/src/comp/syntax/parse
diff options
context:
space:
mode:
authorErick Tryzelaar <erick.tryzelaar@gmail.com>2011-07-18 08:41:35 -0700
committerBrian Anderson <banderson@mozilla.com>2011-08-09 11:29:36 -0700
commita37e00ed1f7f06438630186ccd5c5fd2d0f8b251 (patch)
tree2b39dcc173af0618a3ff0e66d6416670b010d2e9 /src/comp/syntax/parse
parentbf7b516bdbcb531a964063271c8cd4128125a6bc (diff)
Change the ivec type syntax to [T].
This preserves the old syntax for now.
Diffstat (limited to 'src/comp/syntax/parse')
-rw-r--r--src/comp/syntax/parse/parser.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/comp/syntax/parse/parser.rs b/src/comp/syntax/parse/parser.rs
index 133b3c41bc7..7f4d5b175d3 100644
--- a/src/comp/syntax/parse/parser.rs
+++ b/src/comp/syntax/parse/parser.rs
@@ -554,6 +554,11 @@ fn parse_ty(p: &parser) -> @ast::ty {
         t = ast::ty_vec(parse_mt(p));
         hi = p.get_hi_pos();
         expect(p, token::RBRACKET);
+    } else if (p.peek() == token::LBRACKET) {
+        expect(p, token::LBRACKET);
+        t = ast::ty_ivec(parse_mt(p));
+        hi = p.get_hi_pos();
+        expect(p, token::RBRACKET);
     } else if (eat_word(p, "fn")) {
         let flo = p.get_last_lo_pos();
         t = parse_ty_fn(ast::proto_fn, p, flo);