From 614624a34c7917c76927163ca3d82eef01e1c369 Mon Sep 17 00:00:00 2001 From: Ben Striegel Date: Thu, 11 Oct 2012 22:47:31 -0400 Subject: [PATCH] No longer parse old fixed-length vec sytnax --- src/libsyntax/parse/parser.rs | 39 +---------------------------------- 1 file changed, 1 insertion(+), 38 deletions(-) diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs index 46905b8fe01..879df19f11a 100644 --- a/src/libsyntax/parse/parser.rs +++ b/src/libsyntax/parse/parser.rs @@ -554,12 +554,7 @@ impl Parser { 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 @@ impl Parser { } } - fn maybe_parse_fixed_vstore() -> Option> { - 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> { if self.eat(token::BINOP(token::STAR)) { match copy self.token { @@ -1083,21 +1061,6 @@ impl Parser { 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); }