Index: src/scanner.cc |
diff --git a/src/scanner.cc b/src/scanner.cc |
index 3c682014fe81ddffb401f50be5f23beb98ec034c..e0858c78641de6ae5f9b5987744c7ac2fd85ff42 100644 |
--- a/src/scanner.cc |
+++ b/src/scanner.cc |
@@ -466,10 +466,12 @@ void Scanner::Scan() { |
break; |
case '=': |
- // = == === |
+ // = == === => |
Advance(); |
if (c0_ == '=') { |
token = Select('=', Token::EQ_STRICT, Token::EQ); |
+ } else if (c0_ == '>') { |
+ token = Select(Token::ARROW); |
} else { |
token = Token::ASSIGN; |
} |
@@ -1006,6 +1008,16 @@ static Token::Value KeywordOrIdentifierToken(const uint8_t* input, |
} |
+bool Scanner::IdentifierIsFutureStrictReserved( |
+ const AstRawString* string) const { |
+ // Keywords are always 1-byte strings. |
+ return string->is_one_byte() && |
+ Token::FUTURE_STRICT_RESERVED_WORD == |
+ KeywordOrIdentifierToken(string->raw_data(), string->length(), |
+ harmony_scoping_, harmony_modules_); |
+} |
+ |
+ |
Token::Value Scanner::ScanIdentifierOrKeyword() { |
ASSERT(unicode_cache_->IsIdentifierStart(c0_)); |
LiteralScope literal(this); |