rustc: Parse vector types

This commit is contained in:
Patrick Walton 2010-10-13 10:55:20 -07:00
parent b7e6d9895e
commit d50d481529
2 changed files with 8 additions and 0 deletions

View file

@ -117,6 +117,7 @@ tag ty_ {
ty_char;
ty_str;
ty_box(@ty);
ty_vec(@ty);
ty_tup(vec[tup(bool /* mutability */, @ty)]);
ty_path(path, option[referent]);
}

View file

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