aboutsummaryrefslogtreecommitdiffstats
path: root/Token.h
diff options
context:
space:
mode:
Diffstat (limited to 'Token.h')
-rw-r--r--Token.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/Token.h b/Token.h
index b913f0ce..ac8c618f 100644
--- a/Token.h
+++ b/Token.h
@@ -118,6 +118,7 @@ namespace solidity
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 */ \
@@ -361,10 +362,10 @@ public:
// Predicates
static bool isElementaryTypeName(Value tok) { return Int <= tok && tok < TypesEnd; }
static bool isAssignmentOp(Value tok) { return Assign <= tok && tok <= AssignMod; }
- static bool isBinaryOp(Value op) { return Comma <= op && op <= Mod; }
+ static bool isBinaryOp(Value op) { return Comma <= op && op <= Exp; }
static bool isCommutativeOp(Value op) { return op == BitOr || op == BitXor || op == BitAnd ||
op == Add || op == Mul || op == Equal || op == NotEqual; }
- static bool isArithmeticOp(Value op) { return Add <= op && op <= Mod; }
+ static bool isArithmeticOp(Value op) { return Add <= op && op <= Exp; }
static bool isCompareOp(Value op) { return Equal <= op && op <= In; }
static Value AssignmentToBinaryOp(Value op)