Skip to content

Commit 614624a

Browse files
bstriebrson
authored andcommitted
No longer parse old fixed-length vec sytnax
1 parent 684d945 commit 614624a

File tree

1 file changed

+1
-38
lines changed

1 file changed

+1
-38
lines changed

src/libsyntax/parse/parser.rs

+1-38
Original file line numberDiff line numberDiff line change
@@ -554,12 +554,7 @@ impl Parser {
554554

555555
let sp = mk_sp(lo, self.last_span.hi);
556556
return @{id: self.get_id(),
557-
node: match self.maybe_parse_fixed_vstore() {
558-
// Consider a fixed vstore suffix (/N or /_)
559-
None => t,
560-
Some(v) => {
561-
ty_fixed_length(@{id: self.get_id(), node:t, span: sp}, v)
562-
} },
557+
node: t,
563558
span: sp}
564559
}
565560

@@ -691,23 +686,6 @@ impl Parser {
691686
}
692687
}
693688

694-
fn maybe_parse_fixed_vstore() -> Option<Option<uint>> {
695-
if self.token == token::BINOP(token::SLASH) {
696-
self.bump();
697-
match copy self.token {
698-
token::UNDERSCORE => {
699-
self.bump(); Some(None)
700-
}
701-
token::LIT_INT_UNSUFFIXED(i) if i >= 0i64 => {
702-
self.bump(); Some(Some(i as uint))
703-
}
704-
_ => None
705-
}
706-
} else {
707-
None
708-
}
709-
}
710-
711689
fn maybe_parse_fixed_vstore_with_star() -> Option<Option<uint>> {
712690
if self.eat(token::BINOP(token::STAR)) {
713691
match copy self.token {
@@ -1083,21 +1061,6 @@ impl Parser {
10831061
ex = expr_lit(@lit);
10841062
}
10851063

1086-
// Vstore is legal following expr_lit(lit_str(...)) and expr_vec(...)
1087-
// only.
1088-
match ex {
1089-
expr_lit(@{node: lit_str(_), span: _}) |
1090-
expr_vec(_, _) => match self.maybe_parse_fixed_vstore() {
1091-
None => (),
1092-
Some(v) => {
1093-
hi = self.span.hi;
1094-
ex = expr_vstore(self.mk_expr(lo, hi, ex),
1095-
expr_vstore_fixed(v));
1096-
}
1097-
},
1098-
_ => ()
1099-
}
1100-
11011064
return self.mk_pexpr(lo, hi, ex);
11021065
}
11031066

0 commit comments

Comments
 (0)