diff options
author | Lefteris Karapetsas <lefteris@refu.co> | 2015-01-26 23:14:40 +0800 |
---|---|---|
committer | Lefteris Karapetsas <lefteris@refu.co> | 2015-01-29 04:46:16 +0800 |
commit | 53ef6900b797cde404faac94af3058669187c115 (patch) | |
tree | 879c5fecf54328b03c21c57f4bf6e85bf09c79bd /Parser.cpp | |
parent | b95048768dbb64fc7d14eb93bdaad7c85b74e7c8 (diff) | |
download | dexon-solidity-53ef6900b797cde404faac94af3058669187c115.tar dexon-solidity-53ef6900b797cde404faac94af3058669187c115.tar.gz dexon-solidity-53ef6900b797cde404faac94af3058669187c115.tar.bz2 dexon-solidity-53ef6900b797cde404faac94af3058669187c115.tar.lz dexon-solidity-53ef6900b797cde404faac94af3058669187c115.tar.xz dexon-solidity-53ef6900b797cde404faac94af3058669187c115.tar.zst dexon-solidity-53ef6900b797cde404faac94af3058669187c115.zip |
Adding isStateVariable attribute to a VarDecl
Diffstat (limited to 'Parser.cpp')
-rw-r--r-- | Parser.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -150,7 +150,7 @@ ASTPointer<ContractDefinition> Parser::parseContractDefinition() Token::isElementaryTypeName(currentToken)) { bool const allowVar = false; - stateVariables.push_back(parseVariableDeclaration(allowVar, visibilityIsPublic)); + stateVariables.push_back(parseVariableDeclaration(allowVar, visibilityIsPublic, true)); expectToken(Token::SEMICOLON); } else if (currentToken == Token::MODIFIER) @@ -245,12 +245,12 @@ ASTPointer<StructDefinition> Parser::parseStructDefinition() return nodeFactory.createNode<StructDefinition>(name, members); } -ASTPointer<VariableDeclaration> Parser::parseVariableDeclaration(bool _allowVar, bool _isPublic) +ASTPointer<VariableDeclaration> Parser::parseVariableDeclaration(bool _allowVar, bool _isPublic, bool _isStateVariable) { ASTNodeFactory nodeFactory(*this); ASTPointer<TypeName> type = parseTypeName(_allowVar); nodeFactory.markEndPosition(); - return nodeFactory.createNode<VariableDeclaration>(type, expectIdentifierToken(), _isPublic); + return nodeFactory.createNode<VariableDeclaration>(type, expectIdentifierToken(), _isPublic, _isStateVariable); } ASTPointer<ModifierDefinition> Parser::parseModifierDefinition() |