aboutsummaryrefslogtreecommitdiffstats
path: root/Parser.cpp
diff options
context:
space:
mode:
authorLefteris Karapetsas <lefteris@refu.co>2015-01-26 23:14:40 +0800
committerLefteris Karapetsas <lefteris@refu.co>2015-01-29 04:46:16 +0800
commit53ef6900b797cde404faac94af3058669187c115 (patch)
tree879c5fecf54328b03c21c57f4bf6e85bf09c79bd /Parser.cpp
parentb95048768dbb64fc7d14eb93bdaad7c85b74e7c8 (diff)
downloaddexon-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.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/Parser.cpp b/Parser.cpp
index 1c61aab1..5cfc8f46 100644
--- a/Parser.cpp
+++ b/Parser.cpp
@@ -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()