1
Fork 0

remove unused flag to parse_local fn

This commit is contained in:
John Clements 2013-04-15 16:31:57 -07:00
parent 63397b8519
commit 5411cbf656

View file

@ -2433,8 +2433,7 @@ pub impl Parser {
} }
// parse a local variable declaration // parse a local variable declaration
fn parse_local(&self, is_mutbl: bool, fn parse_local(&self, is_mutbl: bool) -> @local {
allow_init: bool) -> @local {
let lo = self.span.lo; let lo = self.span.lo;
let pat = self.parse_pat(false); let pat = self.parse_pat(false);
let mut ty = @Ty { let mut ty = @Ty {
@ -2443,7 +2442,7 @@ pub impl Parser {
span: mk_sp(lo, lo), span: mk_sp(lo, lo),
}; };
if self.eat(&token::COLON) { ty = self.parse_ty(false); } if self.eat(&token::COLON) { ty = self.parse_ty(false); }
let init = if allow_init { self.parse_initializer() } else { None }; let init = self.parse_initializer();
@spanned( @spanned(
lo, lo,
self.last_span.hi, self.last_span.hi,
@ -2460,9 +2459,9 @@ pub impl Parser {
fn parse_let(&self) -> @decl { fn parse_let(&self) -> @decl {
let is_mutbl = self.eat_keyword(&~"mut"); let is_mutbl = self.eat_keyword(&~"mut");
let lo = self.span.lo; let lo = self.span.lo;
let mut locals = ~[self.parse_local(is_mutbl, true)]; let mut locals = ~[self.parse_local(is_mutbl)];
while self.eat(&token::COMMA) { while self.eat(&token::COMMA) {
locals.push(self.parse_local(is_mutbl, true)); locals.push(self.parse_local(is_mutbl));
} }
return @spanned(lo, self.last_span.hi, decl_local(locals)); return @spanned(lo, self.last_span.hi, decl_local(locals));
} }