diff options
author | Alex Beregszaszi <alex@rtfs.hu> | 2017-08-23 02:09:35 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-08-23 02:09:35 +0800 |
commit | 0ffc5db82b24b4897d5d09cebbaadba37fa63b45 (patch) | |
tree | 023cefa5a9f00b0e6a5bf84d02745ab8e6666121 /libsolidity/parsing/Token.h | |
parent | 210b4870a805620329793c8ba2177a3ff6e7b477 (diff) | |
parent | b1cdf81506de39502db0fb4a4b55ba8155f853ab (diff) | |
download | dexon-solidity-0ffc5db82b24b4897d5d09cebbaadba37fa63b45.tar dexon-solidity-0ffc5db82b24b4897d5d09cebbaadba37fa63b45.tar.gz dexon-solidity-0ffc5db82b24b4897d5d09cebbaadba37fa63b45.tar.bz2 dexon-solidity-0ffc5db82b24b4897d5d09cebbaadba37fa63b45.tar.lz dexon-solidity-0ffc5db82b24b4897d5d09cebbaadba37fa63b45.tar.xz dexon-solidity-0ffc5db82b24b4897d5d09cebbaadba37fa63b45.tar.zst dexon-solidity-0ffc5db82b24b4897d5d09cebbaadba37fa63b45.zip |
Merge pull request #2762 from ethereum/statemutability-view
Introduce view state-mutability (keep constant as alias)
Diffstat (limited to 'libsolidity/parsing/Token.h')
-rw-r--r-- | libsolidity/parsing/Token.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libsolidity/parsing/Token.h b/libsolidity/parsing/Token.h index efbe5e9e..3bc52f1d 100644 --- a/libsolidity/parsing/Token.h +++ b/libsolidity/parsing/Token.h @@ -176,6 +176,7 @@ namespace solidity K(Throw, "throw", 0) \ K(Using, "using", 0) \ K(Var, "var", 0) \ + K(View, "view", 0) \ K(While, "while", 0) \ \ /* Ether subdenominations */ \ @@ -236,7 +237,6 @@ namespace solidity K(Try, "try", 0) \ K(Type, "type", 0) \ K(TypeOf, "typeof", 0) \ - K(View, "view", 0) \ /* Illegal token - not able to scan. */ \ T(Illegal, "ILLEGAL", 0) \ \ @@ -290,7 +290,7 @@ public: static bool isVisibilitySpecifier(Value op) { return isVariableVisibilitySpecifier(op) || op == External; } static bool isVariableVisibilitySpecifier(Value op) { return op == Public || op == Private || op == Internal; } static bool isLocationSpecifier(Value op) { return op == Memory || op == Storage; } - static bool isStateMutabilitySpecifier(Value op) { return op == Constant || op == Payable; } + static bool isStateMutabilitySpecifier(Value op) { return op == Constant || op == View || op == Payable; } 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; } static bool isReservedKeyword(Value op) { return (Abstract <= op && op <= TypeOf); } |