From 468d6b6175f57415c41fb2883a5019fbe4564a02 Mon Sep 17 00:00:00 2001 From: LianaHus Date: Fri, 25 Sep 2015 16:47:40 +0200 Subject: [PATCH] style fixes --- libsolidity/Parser.cpp | 43 ++++++++++++++++++++++++++++++------------ 1 file changed, 31 insertions(+), 12 deletions(-) diff --git a/libsolidity/Parser.cpp b/libsolidity/Parser.cpp index 3fbe4d68b..f3b654ea4 100644 --- a/libsolidity/Parser.cpp +++ b/libsolidity/Parser.cpp @@ -274,9 +274,17 @@ ASTPointer Parser::parseFunctionDefinition(ASTString const* else m_scanner->next(); // just consume the ';' bool const c_isConstructor = (_contractName && *name == *_contractName); - return nodeFactory.createNode(name, visibility, c_isConstructor, docstring, - parameters, isDeclaredConst, modifiers, - returnParameters, block); + return nodeFactory.createNode( + name, + visibility, + c_isConstructor, + docstring, + parameters, + isDeclaredConst, + modifiers, + returnParameters, + block + ); } ASTPointer Parser::parseStructDefinition() @@ -753,7 +761,8 @@ ASTPointer Parser::parseSimpleStatement() } ASTPointer Parser::parseVariableDeclarationStatement( - ASTPointer const& _lookAheadArrayType) + ASTPointer const& _lookAheadArrayType +) { VarDeclParserOptions options; options.allowVar = true; @@ -765,14 +774,16 @@ ASTPointer Parser::parseVariableDeclarationStateme } ASTPointer Parser::parseExpressionStatement( - ASTPointer const& _lookAheadIndexAccessStructure) + ASTPointer const& _lookAheadIndexAccessStructure +) { ASTPointer expression = parseExpression(_lookAheadIndexAccessStructure); return ASTNodeFactory(*this, expression).createNode(expression); } ASTPointer Parser::parseExpression( - ASTPointer const& _lookAheadIndexAccessStructure) + ASTPointer const& _lookAheadIndexAccessStructure +) { ASTPointer expression = parseBinaryExpression(4, _lookAheadIndexAccessStructure); if (!Token::isAssignmentOp(m_scanner->currentToken())) @@ -784,8 +795,10 @@ ASTPointer Parser::parseExpression( return nodeFactory.createNode(expression, assignmentOperator, rightHandSide); } -ASTPointer Parser::parseBinaryExpression(int _minPrecedence, - ASTPointer const& _lookAheadIndexAccessStructure) +ASTPointer Parser::parseBinaryExpression( + int _minPrecedence, + ASTPointer const& _lookAheadIndexAccessStructure +) { ASTPointer expression = parseUnaryExpression(_lookAheadIndexAccessStructure); ASTNodeFactory nodeFactory(*this, expression); @@ -803,7 +816,8 @@ ASTPointer Parser::parseBinaryExpression(int _minPrecedence, } ASTPointer Parser::parseUnaryExpression( - ASTPointer const& _lookAheadIndexAccessStructure) + ASTPointer const& _lookAheadIndexAccessStructure +) { ASTNodeFactory nodeFactory = _lookAheadIndexAccessStructure ? ASTNodeFactory(*this, _lookAheadIndexAccessStructure) : ASTNodeFactory(*this); @@ -830,7 +844,8 @@ ASTPointer Parser::parseUnaryExpression( } ASTPointer Parser::parseLeftHandSideExpression( - ASTPointer const& _lookAheadIndexAccessStructure) + ASTPointer const& _lookAheadIndexAccessStructure +) { ASTNodeFactory nodeFactory = _lookAheadIndexAccessStructure ? ASTNodeFactory(*this, _lookAheadIndexAccessStructure) : ASTNodeFactory(*this); @@ -1014,7 +1029,9 @@ Parser::LookAheadInfo Parser::peekStatementType() const } ASTPointer Parser::typeNameIndexAccessStructure( - ASTPointer const& _primary, vector, SourceLocation>> const& _indices) + ASTPointer const& _primary, + vector, SourceLocation>> const& _indices +) { ASTNodeFactory nodeFactory(*this, _primary); ASTPointer type; @@ -1033,7 +1050,9 @@ ASTPointer Parser::typeNameIndexAccessStructure( } ASTPointer Parser::expressionFromIndexAccessStructure( - ASTPointer const& _primary, vector, SourceLocation>> const& _indices) + ASTPointer const& _primary, + vector, SourceLocation>> const& _indices +) { ASTNodeFactory nodeFactory(*this, _primary); ASTPointer expression(_primary);