Index: src/token.h |
diff --git a/src/token.h b/src/token.h |
index 0f46b118cd58035444d2338896bec214b3cc5d63..12c67bac8765158b1428b4e16aba82f40ae6bc65 100644 |
--- a/src/token.h |
+++ b/src/token.h |
@@ -66,6 +66,7 @@ namespace internal { |
T(ASSIGN_MUL, "*=", 2) \ |
T(ASSIGN_DIV, "/=", 2) \ |
T(ASSIGN_MOD, "%=", 2) \ |
+ T(ASSIGN_EXP, "**=", 2) \ |
\ |
/* Binary operators sorted by precedence. */ \ |
/* IsBinaryOp() relies on this block of enum values */ \ |
@@ -85,6 +86,7 @@ namespace internal { |
T(MUL, "*", 13) \ |
T(DIV, "/", 13) \ |
T(MOD, "%", 13) \ |
+ T(EXP, "**", 14) \ |
\ |
/* Compare operators sorted by precedence. */ \ |
/* IsCompareOp() relies on this block of enum values */ \ |
@@ -212,11 +214,11 @@ class Token { |
} |
static bool IsAssignmentOp(Value tok) { |
- return INIT_VAR <= tok && tok <= ASSIGN_MOD; |
+ return INIT_VAR <= tok && tok <= ASSIGN_EXP; |
} |
static bool IsBinaryOp(Value op) { |
- return COMMA <= op && op <= MOD; |
+ return COMMA <= op && op <= EXP; |
} |
static bool IsTruncatingBinaryOp(Value op) { |