aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorchriseth <c@ethdev.com>2015-06-05 20:45:47 +0800
committerchriseth <c@ethdev.com>2015-06-05 20:45:47 +0800
commit92eb04c6eccba8b6d7c5c02e5ca2084d9e4fecf6 (patch)
treed06b714e1975c6540d4ad2027b7cf12affe3c73c
parentf4d1acc563a972ee4f5a44c690cd3fdd1783ae97 (diff)
downloaddexon-solidity-92eb04c6eccba8b6d7c5c02e5ca2084d9e4fecf6.tar.gz
dexon-solidity-92eb04c6eccba8b6d7c5c02e5ca2084d9e4fecf6.tar.zst
dexon-solidity-92eb04c6eccba8b6d7c5c02e5ca2084d9e4fecf6.zip
Style.
-rw-r--r--AST.h10
-rw-r--r--Parser.cpp13
2 files changed, 15 insertions, 8 deletions
diff --git a/AST.h b/AST.h
index d7534712..578709c1 100644
--- a/AST.h
+++ b/AST.h
@@ -524,11 +524,11 @@ protected:
Visibility getDefaultVisibility() const override { return Visibility::Internal; }
private:
- ASTPointer<TypeName> m_typeName; ///< can be empty ("var")
- ASTPointer<Expression> m_value; ///< the assigned value, can be missing
- bool m_isStateVariable; ///< Whether or not this is a contract state variable
- bool m_isIndexed; ///< Whether this is an indexed variable (used by events).
- bool m_isConstant; ///< Whether the variable is a compile-time constant.
+ ASTPointer<TypeName> m_typeName; ///< can be empty ("var")
+ ASTPointer<Expression> m_value; ///< the assigned value, can be missing
+ bool m_isStateVariable; ///< Whether or not this is a contract state variable
+ bool m_isIndexed; ///< Whether this is an indexed variable (used by events).
+ bool m_isConstant; ///< Whether the variable is a compile-time constant.
Location m_location; ///< Location of the variable if it is of reference type.
std::shared_ptr<Type const> m_type; ///< derived type, initially empty
diff --git a/Parser.cpp b/Parser.cpp
index 851f1669..548b7dc2 100644
--- a/Parser.cpp
+++ b/Parser.cpp
@@ -394,9 +394,16 @@ ASTPointer<VariableDeclaration> Parser::parseVariableDeclaration(
nodeFactory.setEndPositionFromNode(value);
}
}
- return nodeFactory.createNode<VariableDeclaration>(type, identifier, value,
- visibility, _options.isStateVariable,
- isIndexed, isDeclaredConst, location);
+ return nodeFactory.createNode<VariableDeclaration>(
+ type,
+ identifier,
+ value,
+ visibility,
+ _options.isStateVariable,
+ isIndexed,
+ isDeclaredConst,
+ location
+ );
}
ASTPointer<ModifierDefinition> Parser::parseModifierDefinition()