Parse and report obsolete fixed-length vector syntax

This commit is contained in:
Brian Anderson
2012-10-20 16:33:59 -07:00
parent 41c37d9d0f
commit f3df50f67f
3 changed files with 88 additions and 3 deletions

View File

@@ -553,9 +553,13 @@ impl Parser {
} else { self.fatal(~"expected type"); };
let sp = mk_sp(lo, self.last_span.hi);
return @{id: self.get_id(),
node: t,
return {
let node =
self.try_convert_ty_to_obsolete_fixed_length_vstore(sp, t);
@{id: self.get_id(),
node: node,
span: sp}
};
}
fn parse_arg_mode() -> mode {
@@ -1061,6 +1065,9 @@ impl Parser {
ex = expr_lit(@lit);
}
let (hi, ex) =
self.try_convert_expr_to_obsolete_fixed_length_vstore(lo, hi, ex);
return self.mk_pexpr(lo, hi, ex);
}