mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Merge pull request #731 from Denton-L/move-token
Move `in` as a keyword to reserved word section
This commit is contained in:
commit
6610add63e
@ -129,7 +129,6 @@ namespace solidity
|
|||||||
T(GreaterThan, ">", 7) \
|
T(GreaterThan, ">", 7) \
|
||||||
T(LessThanOrEqual, "<=", 7) \
|
T(LessThanOrEqual, "<=", 7) \
|
||||||
T(GreaterThanOrEqual, ">=", 7) \
|
T(GreaterThanOrEqual, ">=", 7) \
|
||||||
K(In, "in", 7) \
|
|
||||||
\
|
\
|
||||||
/* Unary operators. */ \
|
/* Unary operators. */ \
|
||||||
/* IsUnaryOp() relies on this block of enum values */ \
|
/* IsUnaryOp() relies on this block of enum values */ \
|
||||||
@ -220,6 +219,7 @@ namespace solidity
|
|||||||
K(Case, "case", 0) \
|
K(Case, "case", 0) \
|
||||||
K(Catch, "catch", 0) \
|
K(Catch, "catch", 0) \
|
||||||
K(Final, "final", 0) \
|
K(Final, "final", 0) \
|
||||||
|
K(In, "in", 0) \
|
||||||
K(Inline, "inline", 0) \
|
K(Inline, "inline", 0) \
|
||||||
K(Let, "let", 0) \
|
K(Let, "let", 0) \
|
||||||
K(Match, "match", 0) \
|
K(Match, "match", 0) \
|
||||||
@ -267,7 +267,7 @@ public:
|
|||||||
static bool isCommutativeOp(Value op) { return op == BitOr || op == BitXor || op == BitAnd ||
|
static bool isCommutativeOp(Value op) { return op == BitOr || op == BitXor || op == BitAnd ||
|
||||||
op == Add || op == Mul || op == Equal || op == NotEqual; }
|
op == Add || op == Mul || op == Equal || op == NotEqual; }
|
||||||
static bool isArithmeticOp(Value op) { return Add <= op && op <= Exp; }
|
static bool isArithmeticOp(Value op) { return Add <= op && op <= Exp; }
|
||||||
static bool isCompareOp(Value op) { return Equal <= op && op <= In; }
|
static bool isCompareOp(Value op) { return Equal <= op && op <= GreaterThanOrEqual; }
|
||||||
|
|
||||||
static Value AssignmentToBinaryOp(Value op)
|
static Value AssignmentToBinaryOp(Value op)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user