Index: src/scanner.cc |
diff --git a/src/scanner.cc b/src/scanner.cc |
index de1b8e8b7202d211b297e8ca5737fb8f411299ed..267ae86204e3b7adfd79dc4f7694fc64bab47600 100644 |
--- a/src/scanner.cc |
+++ b/src/scanner.cc |
@@ -40,7 +40,8 @@ Scanner::Scanner(UnicodeCache* unicode_cache) |
harmony_numeric_literals_(false), |
harmony_classes_(false), |
harmony_templates_(false), |
- harmony_unicode_(false) {} |
+ harmony_unicode_(false), |
+ harmony_exponentiation_(false) {} |
void Scanner::Initialize(Utf16CharacterStream* source) { |
@@ -533,8 +534,19 @@ void Scanner::Scan() { |
break; |
case '*': |
- // * *= |
- token = Select('=', Token::ASSIGN_MUL, Token::MUL); |
+ // * *= ** **= |
+ Advance(); |
+ if (c0_ == '*') { |
+ if (HarmonyExponentiation()) { |
+ token = Select('=', Token::ASSIGN_EXP, Token::EXP); |
+ } else { |
+ token = Token::ILLEGAL; |
+ } |
+ } else if (c0_ == '=') { |
+ token = Select(Token::ASSIGN_MUL); |
+ } else { |
+ token = Token::MUL; |
+ } |
break; |
case '%': |