No longer parse old fixed-length vec sytnax
This commit is contained in:
parent
684d945ab7
commit
614624a34c
@ -554,12 +554,7 @@ fn parse_ty(colons_before_params: bool) -> @Ty {
|
||||
|
||||
let sp = mk_sp(lo, self.last_span.hi);
|
||||
return @{id: self.get_id(),
|
||||
node: match self.maybe_parse_fixed_vstore() {
|
||||
// Consider a fixed vstore suffix (/N or /_)
|
||||
None => t,
|
||||
Some(v) => {
|
||||
ty_fixed_length(@{id: self.get_id(), node:t, span: sp}, v)
|
||||
} },
|
||||
node: t,
|
||||
span: sp}
|
||||
}
|
||||
|
||||
@ -691,23 +686,6 @@ fn maybe_parse_dollar_mac() -> Option<mac_> {
|
||||
}
|
||||
}
|
||||
|
||||
fn maybe_parse_fixed_vstore() -> Option<Option<uint>> {
|
||||
if self.token == token::BINOP(token::SLASH) {
|
||||
self.bump();
|
||||
match copy self.token {
|
||||
token::UNDERSCORE => {
|
||||
self.bump(); Some(None)
|
||||
}
|
||||
token::LIT_INT_UNSUFFIXED(i) if i >= 0i64 => {
|
||||
self.bump(); Some(Some(i as uint))
|
||||
}
|
||||
_ => None
|
||||
}
|
||||
} else {
|
||||
None
|
||||
}
|
||||
}
|
||||
|
||||
fn maybe_parse_fixed_vstore_with_star() -> Option<Option<uint>> {
|
||||
if self.eat(token::BINOP(token::STAR)) {
|
||||
match copy self.token {
|
||||
@ -1083,21 +1061,6 @@ fn parse_bottom_expr() -> pexpr {
|
||||
ex = expr_lit(@lit);
|
||||
}
|
||||
|
||||
// Vstore is legal following expr_lit(lit_str(...)) and expr_vec(...)
|
||||
// only.
|
||||
match ex {
|
||||
expr_lit(@{node: lit_str(_), span: _}) |
|
||||
expr_vec(_, _) => match self.maybe_parse_fixed_vstore() {
|
||||
None => (),
|
||||
Some(v) => {
|
||||
hi = self.span.hi;
|
||||
ex = expr_vstore(self.mk_expr(lo, hi, ex),
|
||||
expr_vstore_fixed(v));
|
||||
}
|
||||
},
|
||||
_ => ()
|
||||
}
|
||||
|
||||
return self.mk_pexpr(lo, hi, ex);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user