diff --git a/libsolidity/AST.h b/libsolidity/AST.h index d75347127..578709c1e 100644 --- a/libsolidity/AST.h +++ b/libsolidity/AST.h @@ -524,11 +524,11 @@ protected: Visibility getDefaultVisibility() const override { return Visibility::Internal; } private: - ASTPointer m_typeName; ///< can be empty ("var") - ASTPointer 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 m_typeName; ///< can be empty ("var") + ASTPointer 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 m_type; ///< derived type, initially empty diff --git a/libsolidity/Parser.cpp b/libsolidity/Parser.cpp index 851f1669e..548b7dc21 100644 --- a/libsolidity/Parser.cpp +++ b/libsolidity/Parser.cpp @@ -394,9 +394,16 @@ ASTPointer Parser::parseVariableDeclaration( nodeFactory.setEndPositionFromNode(value); } } - return nodeFactory.createNode(type, identifier, value, - visibility, _options.isStateVariable, - isIndexed, isDeclaredConst, location); + return nodeFactory.createNode( + type, + identifier, + value, + visibility, + _options.isStateVariable, + isIndexed, + isDeclaredConst, + location + ); } ASTPointer Parser::parseModifierDefinition()