aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity/parsing
diff options
context:
space:
mode:
authorAlex Beregszaszi <alex@rtfs.hu>2016-08-27 02:37:10 +0800
committerchriseth <c@ethdev.com>2016-09-06 03:28:28 +0800
commit962531af96a8a3ed6b28462d43c69d78fa48d511 (patch)
tree596929bcbcc12d93597067057edb3311de88af5a /libsolidity/parsing
parent680b83b2a44a8f943d6d78028ad4326f4b3b64c2 (diff)
downloaddexon-solidity-962531af96a8a3ed6b28462d43c69d78fa48d511.tar.gz
dexon-solidity-962531af96a8a3ed6b28462d43c69d78fa48d511.tar.zst
dexon-solidity-962531af96a8a3ed6b28462d43c69d78fa48d511.zip
Merged in changes from chriseth/payable
Diffstat (limited to 'libsolidity/parsing')
-rw-r--r--libsolidity/parsing/Parser.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/libsolidity/parsing/Parser.cpp b/libsolidity/parsing/Parser.cpp
index 1d76f80a..0e99d1e7 100644
--- a/libsolidity/parsing/Parser.cpp
+++ b/libsolidity/parsing/Parser.cpp
@@ -305,6 +305,7 @@ ASTPointer<FunctionDefinition> Parser::parseFunctionDefinition(ASTString const*
options.allowLocationSpecifier = true;
ASTPointer<ParameterList> parameters(parseParameterList(options));
bool isDeclaredConst = false;
+ bool isPayable = false;
Declaration::Visibility visibility(Declaration::Visibility::Default);
vector<ASTPointer<ModifierInvocation>> modifiers;
while (true)
@@ -315,6 +316,11 @@ ASTPointer<FunctionDefinition> Parser::parseFunctionDefinition(ASTString const*
isDeclaredConst = true;
m_scanner->next();
}
+ else if (m_scanner->currentToken() == Token::Payable)
+ {
+ isPayable = true;
+ m_scanner->next();
+ }
else if (token == Token::Identifier)
modifiers.push_back(parseModifierInvocation());
else if (Token::isVisibilitySpecifier(token))
@@ -326,12 +332,6 @@ ASTPointer<FunctionDefinition> Parser::parseFunctionDefinition(ASTString const*
else
break;
}
- bool isPayable = false;
- if (m_scanner->currentToken() == Token::Payable)
- {
- isPayable = true;
- m_scanner->next();
- }
ASTPointer<ParameterList> returnParameters;
if (m_scanner->currentToken() == Token::Returns)
{