| Index: src/scanner.cc
|
| diff --git a/src/scanner.cc b/src/scanner.cc
|
| index df19ee8faf3314176542f89a5c47588371350811..d121466e74330996d06a7be802644e235cd8dfc6 100644
|
| --- a/src/scanner.cc
|
| +++ b/src/scanner.cc
|
| @@ -395,10 +395,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;
|
| }
|
| @@ -928,6 +930,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);
|
|
|