mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Support payable keyword for functions
This commit is contained in:
committed by
chriseth
parent
e2b787cdd0
commit
a34f2f1a31
@@ -326,6 +326,12 @@ 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)
|
||||
{
|
||||
@@ -354,6 +360,7 @@ ASTPointer<FunctionDefinition> Parser::parseFunctionDefinition(ASTString const*
|
||||
isDeclaredConst,
|
||||
modifiers,
|
||||
returnParameters,
|
||||
isPayable,
|
||||
block
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user