aboutsummaryrefslogtreecommitdiffstats
path: root/Token.h
diff options
context:
space:
mode:
Diffstat (limited to 'Token.h')
-rw-r--r--Token.h24
1 files changed, 16 insertions, 8 deletions
diff --git a/Token.h b/Token.h
index 19afaee3..85979b56 100644
--- a/Token.h
+++ b/Token.h
@@ -163,7 +163,7 @@ namespace solidity
K(New, "new", 0) \
K(Public, "public", 0) \
K(Private, "private", 0) \
- K(Internal, "internal", 0) \
+ K(Internal, "internal", 0) \
K(Return, "return", 0) \
K(Returns, "returns", 0) \
K(Struct, "struct", 0) \
@@ -172,11 +172,18 @@ namespace solidity
K(While, "while", 0) \
K(Enum, "enum", 0) \
\
- /* Ether subdenominations */ \
- K(SubWei, "wei", 0) \
- K(SubSzabo, "szabo", 0) \
- K(SubFinney, "finney", 0) \
- K(SubEther, "ether", 0) \
+ /* Ether subdenominations */ \
+ K(SubWei, "wei", 0) \
+ K(SubSzabo, "szabo", 0) \
+ K(SubFinney, "finney", 0) \
+ K(SubEther, "ether", 0) \
+ K(SubSecond, "seconds", 0) \
+ K(SubMinute, "minutes", 0) \
+ K(SubHour, "hours", 0) \
+ K(SubDay, "days", 0) \
+ K(SubWeek, "weeks", 0) \
+ K(SubYear, "years", 0) \
+ K(After, "after", 0) \
/* type keywords, keep them in this order, keep int as first keyword
* the implementation in Types.cpp has to be synced to this here */\
K(Int, "int", 0) \
@@ -377,12 +384,13 @@ public:
}
static bool isBitOp(Value op) { return (BitOr <= op && op <= SHR) || op == BitNot; }
- static bool isUnaryOp(Value op) { return (Not <= op && op <= Delete) || op == Add || op == Sub; }
+ static bool isUnaryOp(Value op) { return (Not <= op && op <= Delete) || op == Add || op == Sub || op == After; }
static bool isCountOp(Value op) { return op == Inc || op == Dec; }
static bool isShiftOp(Value op) { return (SHL <= op) && (op <= SHR); }
static bool isVisibilitySpecifier(Value op) { return isVariableVisibilitySpecifier(op) || op == External; }
static bool isVariableVisibilitySpecifier(Value op) { return op == Public || op == Private || op == Internal; }
- static bool isEtherSubdenomination(Value op) { return op == SubWei || op == SubSzabo || op == SubFinney || op == Token::SubEther; }
+ static bool isEtherSubdenomination(Value op) { return op == SubWei || op == SubSzabo || op == SubFinney || op == SubEther; }
+ static bool isTimeSubdenomination(Value op) { return op == SubSecond || op == SubMinute || op == SubHour || op == SubDay || op == SubWeek || op == SubYear; }
// Returns a string corresponding to the JS token string
// (.e., "<" for the token LT) or NULL if the token doesn't