aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity/Parser.cpp
diff options
context:
space:
mode:
authorLianaHus <liana@ethdev.com>2015-09-08 20:30:21 +0800
committerLianaHus <liana@ethdev.com>2015-09-08 20:30:21 +0800
commitdf8c82bc60f4d9238635082f9a9f41a45b5e2b98 (patch)
treef52b1582b3f532e3b8fcdc91f85ede89e21e8510 /libsolidity/Parser.cpp
parent02d4198242ec3dacc7af31c9446c83adcf014de9 (diff)
downloaddexon-solidity-df8c82bc60f4d9238635082f9a9f41a45b5e2b98.tar
dexon-solidity-df8c82bc60f4d9238635082f9a9f41a45b5e2b98.tar.gz
dexon-solidity-df8c82bc60f4d9238635082f9a9f41a45b5e2b98.tar.bz2
dexon-solidity-df8c82bc60f4d9238635082f9a9f41a45b5e2b98.tar.lz
dexon-solidity-df8c82bc60f4d9238635082f9a9f41a45b5e2b98.tar.xz
dexon-solidity-df8c82bc60f4d9238635082f9a9f41a45b5e2b98.tar.zst
dexon-solidity-df8c82bc60f4d9238635082f9a9f41a45b5e2b98.zip
- renamed AST to ast and ABI to abi
- style fixes
Diffstat (limited to 'libsolidity/Parser.cpp')
-rw-r--r--libsolidity/Parser.cpp19
1 files changed, 11 insertions, 8 deletions
diff --git a/libsolidity/Parser.cpp b/libsolidity/Parser.cpp
index c196c666..e001d0f1 100644
--- a/libsolidity/Parser.cpp
+++ b/libsolidity/Parser.cpp
@@ -139,16 +139,19 @@ ASTPointer<ContractDefinition> Parser::parseContractDefinition()
while (true)
{
Token::Value currentTokenValue= m_scanner->currentToken();
- if (currentTokenValue== Token::RBrace)
+ if (currentTokenValue == Token::RBrace)
break;
- else if (currentTokenValue== Token::Function)
+ else if (currentTokenValue == Token::Function)
functions.push_back(parseFunctionDefinition(name.get()));
- else if (currentTokenValue== Token::Struct)
+ else if (currentTokenValue == Token::Struct)
structs.push_back(parseStructDefinition());
- else if (currentTokenValue== Token::Enum)
+ else if (currentTokenValue == Token::Enum)
enums.push_back(parseEnumDefinition());
- else if (currentTokenValue== Token::Identifier || currentTokenValue== Token::Mapping ||
- Token::isElementaryTypeName(currentTokenValue))
+ else if (
+ currentTokenValue == Token::Identifier ||
+ currentTokenValue == Token::Mapping ||
+ Token::isElementaryTypeName(currentTokenValue)
+ )
{
VarDeclParserOptions options;
options.isStateVariable = true;
@@ -156,9 +159,9 @@ ASTPointer<ContractDefinition> Parser::parseContractDefinition()
stateVariables.push_back(parseVariableDeclaration(options));
expectToken(Token::Semicolon);
}
- else if (currentTokenValue== Token::Modifier)
+ else if (currentTokenValue == Token::Modifier)
modifiers.push_back(parseModifierDefinition());
- else if (currentTokenValue== Token::Event)
+ else if (currentTokenValue == Token::Event)
events.push_back(parseEventDefinition());
else
BOOST_THROW_EXCEPTION(createParserError("Function, variable, struct or modifier declaration expected."));