Change the ivec type syntax to [T].

This preserves the old syntax for now.
This commit is contained in:
Erick Tryzelaar 2011-07-18 08:41:35 -07:00 committed by Brian Anderson
parent bf7b516bdb
commit a37e00ed1f
18 changed files with 62 additions and 50 deletions

View file

@ -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);