about summary refs log tree commit diff
path: root/src/comp/syntax
diff options
context:
space:
mode:
authorErick Tryzelaar <erick.tryzelaar@gmail.com>2011-08-04 16:22:00 -0700
committerBrian Anderson <banderson@mozilla.com>2011-08-09 15:53:26 -0700
commit00ccd6ba4272c487c62b06544219ee150307482a (patch)
tree1aaa4ea4d9040e2f357defc3c99359689281468b /src/comp/syntax
parent491ed7f12c2c9adf186599ac5294cb24825ad36b (diff)
Remove support for the ivec T[] syntax.
Diffstat (limited to 'src/comp/syntax')
-rw-r--r--src/comp/syntax/parse/parser.rs49
1 files changed, 15 insertions, 34 deletions
diff --git a/src/comp/syntax/parse/parser.rs b/src/comp/syntax/parse/parser.rs
index 9bcf6d5aa84..2033e181fe7 100644
--- a/src/comp/syntax/parse/parser.rs
+++ b/src/comp/syntax/parse/parser.rs
@@ -429,42 +429,23 @@ fn parse_ty_postfix(orig_t: ast::ty_, p: &parser) -> @ast::ty {
         // This is explicit type parameter instantiation.
         p.bump();
 
-        let mut;
-        if eat_word(p, "mutable") {
-            if p.peek() == token::QUES {
-                p.bump();
-                mut = ast::maybe_mut;
-            } else { mut = ast::mut; }
-        } else { mut = ast::imm; }
-
-        if mut == ast::imm && p.peek() != token::RBRACKET {
-            // This is explicit type parameter instantiation.
-            let seq =
-                parse_seq_to_end(token::RBRACKET, some(token::COMMA),
-                                 parse_ty, p);
-
+        let seq =
+            parse_seq_to_end(token::RBRACKET, some(token::COMMA),
+                             parse_ty, p);
 
-            alt orig_t {
-              ast::ty_path(pth, ann) {
-                let hi = p.get_hi_pos();
-                ret @spanned(lo, hi,
-                             ast::ty_path(spanned(lo, hi,
-                                                  {global: pth.node.global,
-                                                   idents: pth.node.idents,
-                                                   types: seq}), ann));
-              }
-              _ {
-                p.fatal("type parameter instantiation only allowed for " +
-                            "paths");
-              }
-            }
+        alt orig_t {
+          ast::ty_path(pth, ann) {
+            let hi = p.get_hi_pos();
+            ret @spanned(lo, hi,
+                         ast::ty_path(spanned(lo, hi,
+                                              {global: pth.node.global,
+                                               idents: pth.node.idents,
+                                               types: seq}), ann));
+          }
+          _ {
+            p.fatal("type parameter instantiation only allowed for paths");
+          }
         }
-
-        expect(p, token::RBRACKET);
-        let hi = p.get_hi_pos();
-        // FIXME: spans are probably wrong
-        let t = ast::ty_ivec({ty: @spanned(lo, hi, orig_t), mut: mut});
-        ret parse_ty_postfix(t, p);
     }
     ret @spanned(lo, p.get_lo_pos(), orig_t);
 }