diff options
| author | Patrick Walton <[email protected]> | 2010-10-13 10:55:20 -0700 |
|---|---|---|
| committer | Patrick Walton <[email protected]> | 2010-10-13 10:55:20 -0700 |
| commit | d50d48152998ca474329afd3c7cbf9bed29a6a4f (patch) | |
| tree | ad84e9736a84e561add95dc9ff2ead543d1da2ae /src/comp/front/parser.rs | |
| parent | First stab at a Vim syntax highlighter for Rust (diff) | |
| download | rust-d50d48152998ca474329afd3c7cbf9bed29a6a4f.tar.xz rust-d50d48152998ca474329afd3c7cbf9bed29a6a4f.zip | |
rustc: Parse vector types
Diffstat (limited to 'src/comp/front/parser.rs')
| -rw-r--r-- | src/comp/front/parser.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/comp/front/parser.rs b/src/comp/front/parser.rs index 8d945dd8..d731bf70 100644 --- a/src/comp/front/parser.rs +++ b/src/comp/front/parser.rs @@ -107,6 +107,13 @@ io fn parse_ty(parser p) -> @ast.ty { case (token.AT) { p.bump(); t = ast.ty_box(parse_ty(p)); } + case (token.VEC) { + p.bump(); + expect(p, token.LBRACKET); + t = ast.ty_vec(parse_ty(p)); + expect(p, token.RBRACKET); + } + case (token.TUP) { p.bump(); auto f = parse_possibly_mutable_ty; // FIXME: trans_const_lval bug |