Add ast.ty_mutable.

This commit is contained in:
Graydon Hoare 2010-11-29 12:29:57 -08:00
parent 20b11c832c
commit 38846e39c4
4 changed files with 39 additions and 2 deletions

View file

@ -174,7 +174,12 @@ impure fn parse_ty(parser p) -> @ast.ty {
}
}
case (token.AT) { p.bump(); t = ast.ty_box(parse_ty(p)); }
case (token.AT) {
p.bump();
auto t0 = parse_ty(p);
hi = t0.span;
t = ast.ty_box(t0);
}
case (token.VEC) {
p.bump();
@ -193,6 +198,13 @@ impure fn parse_ty(parser p) -> @ast.ty {
t = ast.ty_tup(elems.node);
}
case (token.MUTABLE) {
p.bump();
auto t0 = parse_ty(p);
hi = p.get_span();
t = ast.ty_mutable(t0);
}
case (token.FN) {
t = parse_ty_fn(p);
alt (t) {