aboutsummaryrefslogtreecommitdiff
path: root/src/comp/front/parser.rs
diff options
context:
space:
mode:
authorPatrick Walton <[email protected]>2010-10-13 10:55:20 -0700
committerPatrick Walton <[email protected]>2010-10-13 10:55:20 -0700
commitd50d48152998ca474329afd3c7cbf9bed29a6a4f (patch)
treead84e9736a84e561add95dc9ff2ead543d1da2ae /src/comp/front/parser.rs
parentFirst stab at a Vim syntax highlighter for Rust (diff)
downloadrust-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.rs7
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