diff options
author | Daniel Kirchner <daniel@ekpyron.org> | 2018-09-07 00:59:50 +0800 |
---|---|---|
committer | Daniel Kirchner <daniel@ekpyron.org> | 2018-09-11 20:52:23 +0800 |
commit | 1ce3581a522a94d9e9a4a84cf8cb63f626e1a14f (patch) | |
tree | 258433cfc4c6fced543ba9cf968995e09438c851 /libsolidity/parsing/Token.h | |
parent | 7d5c13981623f5f931444d227b163d9b0d995fd8 (diff) | |
download | dexon-solidity-1ce3581a522a94d9e9a4a84cf8cb63f626e1a14f.tar.gz dexon-solidity-1ce3581a522a94d9e9a4a84cf8cb63f626e1a14f.tar.zst dexon-solidity-1ce3581a522a94d9e9a4a84cf8cb63f626e1a14f.zip |
Accept ``address payable`` during parsing.
Diffstat (limited to 'libsolidity/parsing/Token.h')
-rw-r--r-- | libsolidity/parsing/Token.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/libsolidity/parsing/Token.h b/libsolidity/parsing/Token.h index 7ce24e69..73c85482 100644 --- a/libsolidity/parsing/Token.h +++ b/libsolidity/parsing/Token.h @@ -312,7 +312,12 @@ 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 || op == CallData; } - static bool isStateMutabilitySpecifier(Value op) { return op == Pure || op == Constant || op == View || op == Payable; } + static bool isStateMutabilitySpecifier(Value op, bool _allowConstant = true) + { + if (op == Constant && _allowConstant) + return true; + return op == Pure || 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 <= Unchecked); } |