Fix assign parsing

= is a keyword not an identifier
This commit is contained in:
greg 2016-01-03 22:28:55 -08:00
parent bc4fbe4276
commit 61c36c4def
1 changed files with 1 additions and 1 deletions

View File

@ -147,7 +147,7 @@ impl Parser {
try!(self.expect(Keyword(Kw::Let)));
let name = try!(self.expect_identifier());
match self.lookahead() {
Some(Identifier(ref s)) if s == "=" => { self.next(); },
Some(Keyword(Kw::Assign)) => { self.next(); },
_ => return parse_error!("Expected `=`"),
}