diff options
author | Alex Beregszaszi <alex@rtfs.hu> | 2018-11-21 23:16:08 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-11-21 23:16:08 +0800 |
commit | c9ee30294c3db078a11588627acbbd73f87d83b7 (patch) | |
tree | 13a8971989ca9c7482fd9264663cd6f339a25889 /libsolidity/ast/AST.h | |
parent | 8e98885c531853e51673a350008305065ef89efb (diff) | |
parent | ea8b7d803ebd151401be7479f48afb0ad19f5f74 (diff) | |
download | dexon-solidity-c9ee30294c3db078a11588627acbbd73f87d83b7.tar.gz dexon-solidity-c9ee30294c3db078a11588627acbbd73f87d83b7.tar.zst dexon-solidity-c9ee30294c3db078a11588627acbbd73f87d83b7.zip |
Merge pull request #5444 from Mordax/issue-5168-rmvirtual
Removing redundant virtual from override function declaration
Diffstat (limited to 'libsolidity/ast/AST.h')
-rw-r--r-- | libsolidity/ast/AST.h | 254 |
1 files changed, 127 insertions, 127 deletions
diff --git a/libsolidity/ast/AST.h b/libsolidity/ast/AST.h index 4fd2bcb8..23a6078b 100644 --- a/libsolidity/ast/AST.h +++ b/libsolidity/ast/AST.h @@ -126,9 +126,9 @@ public: SourceUnit(SourceLocation const& _location, std::vector<ASTPointer<ASTNode>> const& _nodes): ASTNode(_location), m_nodes(_nodes) {} - virtual void accept(ASTVisitor& _visitor) override; - virtual void accept(ASTConstVisitor& _visitor) const override; - virtual SourceUnitAnnotation& annotation() const override; + void accept(ASTVisitor& _visitor) override; + void accept(ASTConstVisitor& _visitor) const override; + SourceUnitAnnotation& annotation() const override; std::vector<ASTPointer<ASTNode>> nodes() const { return m_nodes; } @@ -242,8 +242,8 @@ public: ): ASTNode(_location), m_tokens(_tokens), m_literals(_literals) {} - virtual void accept(ASTVisitor& _visitor) override; - virtual void accept(ASTConstVisitor& _visitor) const override; + void accept(ASTVisitor& _visitor) override; + void accept(ASTConstVisitor& _visitor) const override; std::vector<Token> const& tokens() const { return m_tokens; } std::vector<ASTString> const& literals() const { return m_literals; } @@ -279,17 +279,17 @@ public: m_symbolAliases(_symbolAliases) { } - virtual void accept(ASTVisitor& _visitor) override; - virtual void accept(ASTConstVisitor& _visitor) const override; + void accept(ASTVisitor& _visitor) override; + void accept(ASTConstVisitor& _visitor) const override; ASTString const& path() const { return *m_path; } std::vector<std::pair<ASTPointer<Identifier>, ASTPointer<ASTString>>> const& symbolAliases() const { return m_symbolAliases; } - virtual ImportAnnotation& annotation() const override; + ImportAnnotation& annotation() const override; - virtual TypePointer type() const override; + TypePointer type() const override; private: ASTPointer<ASTString> m_path; @@ -375,8 +375,8 @@ public: m_contractKind(_contractKind) {} - virtual void accept(ASTVisitor& _visitor) override; - virtual void accept(ASTConstVisitor& _visitor) const override; + void accept(ASTVisitor& _visitor) override; + void accept(ASTConstVisitor& _visitor) const override; std::vector<ASTPointer<InheritanceSpecifier>> const& baseContracts() const { return m_baseContracts; } std::vector<ASTPointer<ASTNode>> const& subNodes() const { return m_subNodes; } @@ -407,9 +407,9 @@ public: std::string fullyQualifiedName() const { return sourceUnitName() + ":" + name(); } - virtual TypePointer type() const override; + TypePointer type() const override; - virtual ContractDefinitionAnnotation& annotation() const override; + ContractDefinitionAnnotation& annotation() const override; ContractKind contractKind() const { return m_contractKind; } @@ -434,8 +434,8 @@ public: ): ASTNode(_location), m_baseName(_baseName), m_arguments(std::move(_arguments)) {} - virtual void accept(ASTVisitor& _visitor) override; - virtual void accept(ASTConstVisitor& _visitor) const override; + void accept(ASTVisitor& _visitor) override; + void accept(ASTConstVisitor& _visitor) const override; UserDefinedTypeName const& name() const { return *m_baseName; } // Returns nullptr if no argument list was given (``C``). @@ -463,8 +463,8 @@ public: ): ASTNode(_location), m_libraryName(_libraryName), m_typeName(_typeName) {} - virtual void accept(ASTVisitor& _visitor) override; - virtual void accept(ASTConstVisitor& _visitor) const override; + void accept(ASTVisitor& _visitor) override; + void accept(ASTConstVisitor& _visitor) const override; UserDefinedTypeName const& libraryName() const { return *m_libraryName; } /// @returns the type name the library is attached to, null for `*`. @@ -485,14 +485,14 @@ public: ): Declaration(_location, _name), m_members(_members) {} - virtual void accept(ASTVisitor& _visitor) override; - virtual void accept(ASTConstVisitor& _visitor) const override; + void accept(ASTVisitor& _visitor) override; + void accept(ASTConstVisitor& _visitor) const override; std::vector<ASTPointer<VariableDeclaration>> const& members() const { return m_members; } - virtual TypePointer type() const override; + TypePointer type() const override; - virtual TypeDeclarationAnnotation& annotation() const override; + TypeDeclarationAnnotation& annotation() const override; private: std::vector<ASTPointer<VariableDeclaration>> m_members; @@ -507,14 +507,14 @@ public: std::vector<ASTPointer<EnumValue>> const& _members ): Declaration(_location, _name), m_members(_members) {} - virtual void accept(ASTVisitor& _visitor) override; - virtual void accept(ASTConstVisitor& _visitor) const override; + void accept(ASTVisitor& _visitor) override; + void accept(ASTConstVisitor& _visitor) const override; std::vector<ASTPointer<EnumValue>> const& members() const { return m_members; } - virtual TypePointer type() const override; + TypePointer type() const override; - virtual TypeDeclarationAnnotation& annotation() const override; + TypeDeclarationAnnotation& annotation() const override; private: std::vector<ASTPointer<EnumValue>> m_members; @@ -529,10 +529,10 @@ public: EnumValue(SourceLocation const& _location, ASTPointer<ASTString> const& _name): Declaration(_location, _name) {} - virtual void accept(ASTVisitor& _visitor) override; - virtual void accept(ASTConstVisitor& _visitor) const override; + void accept(ASTVisitor& _visitor) override; + void accept(ASTConstVisitor& _visitor) const override; - virtual TypePointer type() const override; + TypePointer type() const override; }; /** @@ -548,8 +548,8 @@ public: std::vector<ASTPointer<VariableDeclaration>> const& _parameters ): ASTNode(_location), m_parameters(_parameters) {} - virtual void accept(ASTVisitor& _visitor) override; - virtual void accept(ASTConstVisitor& _visitor) const override; + void accept(ASTVisitor& _visitor) override; + void accept(ASTConstVisitor& _visitor) const override; std::vector<ASTPointer<VariableDeclaration>> const& parameters() const { return m_parameters; } @@ -610,8 +610,8 @@ public: m_body(_body) {} - virtual void accept(ASTVisitor& _visitor) override; - virtual void accept(ASTConstVisitor& _visitor) const override; + void accept(ASTVisitor& _visitor) override; + void accept(ASTConstVisitor& _visitor) const override; StateMutability stateMutability() const { return m_stateMutability; } bool isConstructor() const { return m_isConstructor; } @@ -620,11 +620,11 @@ public: std::vector<ASTPointer<ModifierInvocation>> const& modifiers() const { return m_functionModifiers; } std::vector<ASTPointer<VariableDeclaration>> const& returnParameters() const { return m_returnParameters->parameters(); } Block const& body() const { solAssert(m_body, ""); return *m_body; } - virtual bool isVisibleInContract() const override + bool isVisibleInContract() const override { return Declaration::isVisibleInContract() && !isConstructor() && !isFallback(); } - virtual bool isPartOfExternalInterface() const override { return isPublic() && !isConstructor() && !isFallback(); } + bool isPartOfExternalInterface() const override { return isPublic() && !isConstructor() && !isFallback(); } /// @returns the external signature of the function /// That consists of the name of the function followed by the types of the @@ -633,13 +633,13 @@ public: ContractDefinition::ContractKind inContractKind() const; - virtual TypePointer type() const override; + TypePointer type() const override; /// @param _internal false indicates external interface is concerned, true indicates internal interface is concerned. /// @returns null when it is not accessible as a function. - virtual FunctionTypePointer functionType(bool /*_internal*/) const override; + FunctionTypePointer functionType(bool /*_internal*/) const override; - virtual FunctionDefinitionAnnotation& annotation() const override; + FunctionDefinitionAnnotation& annotation() const override; private: StateMutability m_stateMutability; @@ -676,14 +676,14 @@ public: m_isConstant(_isConstant), m_location(_referenceLocation) {} - virtual void accept(ASTVisitor& _visitor) override; - virtual void accept(ASTConstVisitor& _visitor) const override; + void accept(ASTVisitor& _visitor) override; + void accept(ASTConstVisitor& _visitor) const override; TypeName* typeName() const { return m_typeName.get(); } ASTPointer<Expression> const& value() const { return m_value; } - virtual bool isLValue() const override; - virtual bool isPartOfExternalInterface() const override { return isPublic(); } + bool isLValue() const override; + bool isPartOfExternalInterface() const override { return isPublic(); } /// @returns true iff this variable is the parameter (or return parameter) of a function /// (or function type name or event) or declared inside a function body. @@ -717,13 +717,13 @@ public: /// @returns a set of allowed storage locations for the variable. std::set<Location> allowedDataLocations() const; - virtual TypePointer type() const override; + TypePointer type() const override; /// @param _internal false indicates external interface is concerned, true indicates internal interface is concerned. /// @returns null when it is not accessible as a function. - virtual FunctionTypePointer functionType(bool /*_internal*/) const override; + FunctionTypePointer functionType(bool /*_internal*/) const override; - virtual VariableDeclarationAnnotation& annotation() const override; + VariableDeclarationAnnotation& annotation() const override; protected: Visibility defaultVisibility() const override { return Visibility::Internal; } @@ -758,14 +758,14 @@ public: { } - virtual void accept(ASTVisitor& _visitor) override; - virtual void accept(ASTConstVisitor& _visitor) const override; + void accept(ASTVisitor& _visitor) override; + void accept(ASTConstVisitor& _visitor) const override; Block const& body() const { return *m_body; } - virtual TypePointer type() const override; + TypePointer type() const override; - virtual ModifierDefinitionAnnotation& annotation() const override; + ModifierDefinitionAnnotation& annotation() const override; private: ASTPointer<Block> m_body; @@ -784,8 +784,8 @@ public: ): ASTNode(_location), m_modifierName(_name), m_arguments(std::move(_arguments)) {} - virtual void accept(ASTVisitor& _visitor) override; - virtual void accept(ASTConstVisitor& _visitor) const override; + void accept(ASTVisitor& _visitor) override; + void accept(ASTConstVisitor& _visitor) const override; ASTPointer<Identifier> const& name() const { return m_modifierName; } // Returns nullptr if no argument list was given (``mod``). @@ -817,15 +817,15 @@ public: { } - virtual void accept(ASTVisitor& _visitor) override; - virtual void accept(ASTConstVisitor& _visitor) const override; + void accept(ASTVisitor& _visitor) override; + void accept(ASTConstVisitor& _visitor) const override; bool isAnonymous() const { return m_anonymous; } - virtual TypePointer type() const override; - virtual FunctionTypePointer functionType(bool /*_internal*/) const override; + TypePointer type() const override; + FunctionTypePointer functionType(bool /*_internal*/) const override; - virtual EventDefinitionAnnotation& annotation() const override; + EventDefinitionAnnotation& annotation() const override; private: bool m_anonymous = false; @@ -840,21 +840,21 @@ class MagicVariableDeclaration: public Declaration public: MagicVariableDeclaration(ASTString const& _name, std::shared_ptr<Type const> const& _type): Declaration(SourceLocation(), std::make_shared<ASTString>(_name)), m_type(_type) {} - virtual void accept(ASTVisitor&) override + void accept(ASTVisitor&) override { solAssert(false, "MagicVariableDeclaration used inside real AST."); } - virtual void accept(ASTConstVisitor&) const override + void accept(ASTConstVisitor&) const override { solAssert(false, "MagicVariableDeclaration used inside real AST."); } - virtual FunctionTypePointer functionType(bool) const override + FunctionTypePointer functionType(bool) const override { solAssert(m_type->category() == Type::Category::Function, ""); return std::dynamic_pointer_cast<FunctionType const>(m_type); } - virtual TypePointer type() const override { return m_type; } + TypePointer type() const override { return m_type; } private: std::shared_ptr<Type const> m_type; @@ -872,7 +872,7 @@ protected: explicit TypeName(SourceLocation const& _location): ASTNode(_location) {} public: - virtual TypeNameAnnotation& annotation() const override; + TypeNameAnnotation& annotation() const override; }; /** @@ -891,8 +891,8 @@ public: solAssert(!_stateMutability.is_initialized() || _elem.token() == Token::Address, ""); } - virtual void accept(ASTVisitor& _visitor) override; - virtual void accept(ASTConstVisitor& _visitor) const override; + void accept(ASTVisitor& _visitor) override; + void accept(ASTConstVisitor& _visitor) const override; ElementaryTypeNameToken const& typeName() const { return m_type; } @@ -911,12 +911,12 @@ class UserDefinedTypeName: public TypeName public: UserDefinedTypeName(SourceLocation const& _location, std::vector<ASTString> const& _namePath): TypeName(_location), m_namePath(_namePath) {} - virtual void accept(ASTVisitor& _visitor) override; - virtual void accept(ASTConstVisitor& _visitor) const override; + void accept(ASTVisitor& _visitor) override; + void accept(ASTConstVisitor& _visitor) const override; std::vector<ASTString> const& namePath() const { return m_namePath; } - virtual UserDefinedTypeNameAnnotation& annotation() const override; + UserDefinedTypeNameAnnotation& annotation() const override; private: std::vector<ASTString> m_namePath; @@ -938,8 +938,8 @@ public: TypeName(_location), m_parameterTypes(_parameterTypes), m_returnTypes(_returnTypes), m_visibility(_visibility), m_stateMutability(_stateMutability) {} - virtual void accept(ASTVisitor& _visitor) override; - virtual void accept(ASTConstVisitor& _visitor) const override; + void accept(ASTVisitor& _visitor) override; + void accept(ASTConstVisitor& _visitor) const override; std::vector<ASTPointer<VariableDeclaration>> const& parameterTypes() const { return m_parameterTypes->parameters(); } std::vector<ASTPointer<VariableDeclaration>> const& returnParameterTypes() const { return m_returnTypes->parameters(); } @@ -972,8 +972,8 @@ public: ASTPointer<TypeName> const& _valueType ): TypeName(_location), m_keyType(_keyType), m_valueType(_valueType) {} - virtual void accept(ASTVisitor& _visitor) override; - virtual void accept(ASTConstVisitor& _visitor) const override; + void accept(ASTVisitor& _visitor) override; + void accept(ASTConstVisitor& _visitor) const override; ElementaryTypeName const& keyType() const { return *m_keyType; } TypeName const& valueType() const { return *m_valueType; } @@ -995,8 +995,8 @@ public: ASTPointer<Expression> const& _length ): TypeName(_location), m_baseType(_baseType), m_length(_length) {} - virtual void accept(ASTVisitor& _visitor) override; - virtual void accept(ASTConstVisitor& _visitor) const override; + void accept(ASTVisitor& _visitor) override; + void accept(ASTConstVisitor& _visitor) const override; TypeName const& baseType() const { return *m_baseType; } Expression const* length() const { return m_length.get(); } @@ -1023,7 +1023,7 @@ public: ASTPointer<ASTString> const& _docString ): ASTNode(_location), Documented(_docString) {} - virtual StatementAnnotation& annotation() const override; + StatementAnnotation& annotation() const override; }; namespace assembly @@ -1044,12 +1044,12 @@ public: std::shared_ptr<assembly::Block> const& _operations ): Statement(_location, _docString), m_operations(_operations) {} - virtual void accept(ASTVisitor& _visitor) override; - virtual void accept(ASTConstVisitor& _visitor) const override; + void accept(ASTVisitor& _visitor) override; + void accept(ASTConstVisitor& _visitor) const override; assembly::Block const& operations() const { return *m_operations; } - virtual InlineAssemblyAnnotation& annotation() const override; + InlineAssemblyAnnotation& annotation() const override; private: std::shared_ptr<assembly::Block> m_operations; @@ -1067,8 +1067,8 @@ public: std::vector<ASTPointer<Statement>> const& _statements ): Statement(_location, _docString), m_statements(_statements) {} - virtual void accept(ASTVisitor& _visitor) override; - virtual void accept(ASTConstVisitor& _visitor) const override; + void accept(ASTVisitor& _visitor) override; + void accept(ASTConstVisitor& _visitor) const override; std::vector<ASTPointer<Statement>> const& statements() const { return m_statements; } @@ -1088,8 +1088,8 @@ public: ASTPointer<ASTString> const& _docString ): Statement(_location, _docString) {} - virtual void accept(ASTVisitor& _visitor) override; - virtual void accept(ASTConstVisitor& _visitor) const override; + void accept(ASTVisitor& _visitor) override; + void accept(ASTConstVisitor& _visitor) const override; }; /** @@ -1111,8 +1111,8 @@ public: m_trueBody(_trueBody), m_falseBody(_falseBody) {} - virtual void accept(ASTVisitor& _visitor) override; - virtual void accept(ASTConstVisitor& _visitor) const override; + void accept(ASTVisitor& _visitor) override; + void accept(ASTConstVisitor& _visitor) const override; Expression const& condition() const { return *m_condition; } Statement const& trueStatement() const { return *m_trueBody; } @@ -1149,8 +1149,8 @@ public: ): BreakableStatement(_location, _docString), m_condition(_condition), m_body(_body), m_isDoWhile(_isDoWhile) {} - virtual void accept(ASTVisitor& _visitor) override; - virtual void accept(ASTConstVisitor& _visitor) const override; + void accept(ASTVisitor& _visitor) override; + void accept(ASTConstVisitor& _visitor) const override; Expression const& condition() const { return *m_condition; } Statement const& body() const { return *m_body; } @@ -1182,8 +1182,8 @@ public: m_loopExpression(_loopExpression), m_body(_body) {} - virtual void accept(ASTVisitor& _visitor) override; - virtual void accept(ASTConstVisitor& _visitor) const override; + void accept(ASTVisitor& _visitor) override; + void accept(ASTConstVisitor& _visitor) const override; Statement const* initializationExpression() const { return m_initExpression.get(); } Expression const* condition() const { return m_condExpression.get(); } @@ -1206,8 +1206,8 @@ class Continue: public Statement public: explicit Continue(SourceLocation const& _location, ASTPointer<ASTString> const& _docString): Statement(_location, _docString) {} - virtual void accept(ASTVisitor& _visitor) override; - virtual void accept(ASTConstVisitor& _visitor) const override; + void accept(ASTVisitor& _visitor) override; + void accept(ASTConstVisitor& _visitor) const override; }; class Break: public Statement @@ -1215,8 +1215,8 @@ class Break: public Statement public: explicit Break(SourceLocation const& _location, ASTPointer<ASTString> const& _docString): Statement(_location, _docString) {} - virtual void accept(ASTVisitor& _visitor) override; - virtual void accept(ASTConstVisitor& _visitor) const override; + void accept(ASTVisitor& _visitor) override; + void accept(ASTConstVisitor& _visitor) const override; }; class Return: public Statement @@ -1227,12 +1227,12 @@ public: ASTPointer<ASTString> const& _docString, ASTPointer<Expression> _expression ): Statement(_location, _docString), m_expression(_expression) {} - virtual void accept(ASTVisitor& _visitor) override; - virtual void accept(ASTConstVisitor& _visitor) const override; + void accept(ASTVisitor& _visitor) override; + void accept(ASTConstVisitor& _visitor) const override; Expression const* expression() const { return m_expression.get(); } - virtual ReturnAnnotation& annotation() const override; + ReturnAnnotation& annotation() const override; private: ASTPointer<Expression> m_expression; ///< value to return, optional @@ -1246,8 +1246,8 @@ class Throw: public Statement public: explicit Throw(SourceLocation const& _location, ASTPointer<ASTString> const& _docString): Statement(_location, _docString) {} - virtual void accept(ASTVisitor& _visitor) override; - virtual void accept(ASTConstVisitor& _visitor) const override; + void accept(ASTVisitor& _visitor) override; + void accept(ASTConstVisitor& _visitor) const override; }; /** @@ -1262,8 +1262,8 @@ public: ASTPointer<FunctionCall> const& _functionCall ): Statement(_location, _docString), m_eventCall(_functionCall) {} - virtual void accept(ASTVisitor& _visitor) override; - virtual void accept(ASTConstVisitor& _visitor) const override; + void accept(ASTVisitor& _visitor) override; + void accept(ASTConstVisitor& _visitor) const override; FunctionCall const& eventCall() const { return *m_eventCall; } @@ -1289,8 +1289,8 @@ public: ASTPointer<Expression> const& _initialValue ): Statement(_location, _docString), m_variables(_variables), m_initialValue(_initialValue) {} - virtual void accept(ASTVisitor& _visitor) override; - virtual void accept(ASTConstVisitor& _visitor) const override; + void accept(ASTVisitor& _visitor) override; + void accept(ASTConstVisitor& _visitor) const override; std::vector<ASTPointer<VariableDeclaration>> const& declarations() const { return m_variables; } Expression const* initialValue() const { return m_initialValue.get(); } @@ -1317,8 +1317,8 @@ public: ASTPointer<Expression> _expression ): Statement(_location, _docString), m_expression(_expression) {} - virtual void accept(ASTVisitor& _visitor) override; - virtual void accept(ASTConstVisitor& _visitor) const override; + void accept(ASTVisitor& _visitor) override; + void accept(ASTConstVisitor& _visitor) const override; Expression const& expression() const { return *m_expression; } @@ -1358,8 +1358,8 @@ public: m_trueExpression(_trueExpression), m_falseExpression(_falseExpression) {} - virtual void accept(ASTVisitor& _visitor) override; - virtual void accept(ASTConstVisitor& _visitor) const override; + void accept(ASTVisitor& _visitor) override; + void accept(ASTConstVisitor& _visitor) const override; Expression const& condition() const { return *m_condition; } Expression const& trueExpression() const { return *m_trueExpression; } @@ -1389,8 +1389,8 @@ public: { solAssert(TokenTraits::isAssignmentOp(_assignmentOperator), ""); } - virtual void accept(ASTVisitor& _visitor) override; - virtual void accept(ASTConstVisitor& _visitor) const override; + void accept(ASTVisitor& _visitor) override; + void accept(ASTConstVisitor& _visitor) const override; Expression const& leftHandSide() const { return *m_leftHandSide; } Token assignmentOperator() const { return m_assigmentOperator; } @@ -1421,8 +1421,8 @@ public: Expression(_location), m_components(_components), m_isArray(_isArray) {} - virtual void accept(ASTVisitor& _visitor) override; - virtual void accept(ASTConstVisitor& _visitor) const override; + void accept(ASTVisitor& _visitor) override; + void accept(ASTConstVisitor& _visitor) const override; std::vector<ASTPointer<Expression>> const& components() const { return m_components; } bool isInlineArray() const { return m_isArray; } @@ -1452,8 +1452,8 @@ public: { solAssert(TokenTraits::isUnaryOp(_operator), ""); } - virtual void accept(ASTVisitor& _visitor) override; - virtual void accept(ASTConstVisitor& _visitor) const override; + void accept(ASTVisitor& _visitor) override; + void accept(ASTConstVisitor& _visitor) const override; Token getOperator() const { return m_operator; } bool isPrefixOperation() const { return m_isPrefix; } @@ -1482,8 +1482,8 @@ public: { solAssert(TokenTraits::isBinaryOp(_operator) || TokenTraits::isCompareOp(_operator), ""); } - virtual void accept(ASTVisitor& _visitor) override; - virtual void accept(ASTConstVisitor& _visitor) const override; + void accept(ASTVisitor& _visitor) override; + void accept(ASTConstVisitor& _visitor) const override; Expression const& leftExpression() const { return *m_left; } Expression const& rightExpression() const { return *m_right; } @@ -1510,14 +1510,14 @@ public: std::vector<ASTPointer<ASTString>> const& _names ): Expression(_location), m_expression(_expression), m_arguments(_arguments), m_names(_names) {} - virtual void accept(ASTVisitor& _visitor) override; - virtual void accept(ASTConstVisitor& _visitor) const override; + void accept(ASTVisitor& _visitor) override; + void accept(ASTConstVisitor& _visitor) const override; Expression const& expression() const { return *m_expression; } std::vector<ASTPointer<Expression const>> arguments() const { return {m_arguments.begin(), m_arguments.end()}; } std::vector<ASTPointer<ASTString>> const& names() const { return m_names; } - virtual FunctionCallAnnotation& annotation() const override; + FunctionCallAnnotation& annotation() const override; private: ASTPointer<Expression> m_expression; @@ -1537,8 +1537,8 @@ public: ASTPointer<TypeName> const& _typeName ): Expression(_location), m_typeName(_typeName) {} - virtual void accept(ASTVisitor& _visitor) override; - virtual void accept(ASTConstVisitor& _visitor) const override; + void accept(ASTVisitor& _visitor) override; + void accept(ASTConstVisitor& _visitor) const override; TypeName const& typeName() const { return *m_typeName; } @@ -1558,12 +1558,12 @@ public: ASTPointer<ASTString> const& _memberName ): Expression(_location), m_expression(_expression), m_memberName(_memberName) {} - virtual void accept(ASTVisitor& _visitor) override; - virtual void accept(ASTConstVisitor& _visitor) const override; + void accept(ASTVisitor& _visitor) override; + void accept(ASTConstVisitor& _visitor) const override; Expression const& expression() const { return *m_expression; } ASTString const& memberName() const { return *m_memberName; } - virtual MemberAccessAnnotation& annotation() const override; + MemberAccessAnnotation& annotation() const override; private: ASTPointer<Expression> m_expression; @@ -1582,8 +1582,8 @@ public: ASTPointer<Expression> const& _index ): Expression(_location), m_base(_base), m_index(_index) {} - virtual void accept(ASTVisitor& _visitor) override; - virtual void accept(ASTConstVisitor& _visitor) const override; + void accept(ASTVisitor& _visitor) override; + void accept(ASTConstVisitor& _visitor) const override; Expression const& baseExpression() const { return *m_base; } Expression const* indexExpression() const { return m_index.get(); } @@ -1614,12 +1614,12 @@ public: ASTPointer<ASTString> const& _name ): PrimaryExpression(_location), m_name(_name) {} - virtual void accept(ASTVisitor& _visitor) override; - virtual void accept(ASTConstVisitor& _visitor) const override; + void accept(ASTVisitor& _visitor) override; + void accept(ASTConstVisitor& _visitor) const override; ASTString const& name() const { return *m_name; } - virtual IdentifierAnnotation& annotation() const override; + IdentifierAnnotation& annotation() const override; private: ASTPointer<ASTString> m_name; @@ -1636,8 +1636,8 @@ public: ElementaryTypeNameExpression(SourceLocation const& _location, ElementaryTypeNameToken const& _type): PrimaryExpression(_location), m_typeToken(_type) {} - virtual void accept(ASTVisitor& _visitor) override; - virtual void accept(ASTConstVisitor& _visitor) const override; + void accept(ASTVisitor& _visitor) override; + void accept(ASTConstVisitor& _visitor) const override; ElementaryTypeNameToken const& typeName() const { return m_typeToken; } @@ -1672,8 +1672,8 @@ public: SubDenomination _sub = SubDenomination::None ): PrimaryExpression(_location), m_token(_token), m_value(_value), m_subDenomination(_sub) {} - virtual void accept(ASTVisitor& _visitor) override; - virtual void accept(ASTConstVisitor& _visitor) const override; + void accept(ASTVisitor& _visitor) override; + void accept(ASTConstVisitor& _visitor) const override; Token token() const { return m_token; } /// @returns the non-parsed value of the literal |