/* This file is part of solidity. solidity is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. solidity is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with solidity. If not, see . */ /** * @author Christian * @date 2014 * Component that resolves type names to types and annotates the AST accordingly. */ #pragma once #include #include #include #include #include namespace dev { namespace solidity { class NameAndTypeResolver; /** * Resolves references to declarations (of variables and types) and also establishes the link * between a return statement and the return parameter list. */ class ReferencesResolver: private ASTConstVisitor { public: ReferencesResolver( ErrorList& _errors, NameAndTypeResolver& _resolver, ParameterList const* _returnParameters, bool _resolveInsideCode = false ): m_errors(_errors), m_resolver(_resolver), m_returnParameters(_returnParameters), m_resolveInsideCode(_resolveInsideCode) {} /// @returns true if no errors during resolving bool resolve(ASTNode const& _root); private: virtual bool visit(Block const&) override { return m_resolveInsideCode; } virtual bool visit(Identifier const& _identifier) override; virtual bool visit(ElementaryTypeName const& _typeName) override; virtual void endVisit(UserDefinedTypeName const& _typeName) override; virtual void endVisit(FunctionTypeName const& _typeName) override; virtual void endVisit(Mapping const& _typeName) override; virtual void endVisit(ArrayTypeName const& _typeName) override; virtual bool visit(InlineAssembly const& _inlineAssembly) override; virtual bool visit(Return const& _return) override; virtual void endVisit(VariableDeclaration const& _variable) override; /// Adds a new error to the list of errors. void typeError(SourceLocation const& _location, std::string const& _description); /// Adds a new error to the list of errors and throws to abort type checking. void fatalTypeError(SourceLocation const& _location, std::string const& _description); /// Adds a new error to the list of errors. void declarationError(const SourceLocation& _location, std::string const& _description); /// Adds a new error to the list of errors and throws to abort type checking. void fatalDeclarationError(const SourceLocation& _location, std::string const& _description); ErrorList& m_errors; NameAndTypeResolver& m_resolver; ParameterList const* m_returnParameters; bool const m_resolveInsideCode; bool m_errorOccurred = false; }; } } ion> FreeBSD Ports (https://github.com/freebsd/freebsd-ports)
aboutsummaryrefslogtreecommitdiffstats
Commit message (Expand)AuthorAgeFilesLines
* Remove the usage of 'misc' as a secondary category.Mark Linimon2005-11-102-2/+2
* Update to KDE 3.4.3 / KOffice 1.4.2Michael Nottebrock2005-11-055-8/+7
* Remove all the secondary port of editors/ooodict-allMaho Nakata2005-11-012-21/+0
* Fix index build by moving openoffice.org-1.1 ports.Maho Nakata2005-08-291-1/+1
* Update to KDE 3.4.2 / KOffice 1.4.1Michael Nottebrock2005-08-014-7/+7
* Update to KOffice 1.4.0a.Michael Nottebrock2005-07-063-30/+7
* Remove openoffice.org localized ports as I announced:Maho Nakata2005-06-292-16/+0
* Update to KDE 3.4.1Michael Nottebrock2005-06-264-10/+4
* - Unbreak and general updatePav Lucistnik2005-06-061-2/+2
* Added slave port of lang/php_doc for the Hungarian languageEdwin Groothuis2005-05-232-0/+14
* - Update to 1.0.R.2Pav Lucistnik2005-05-203-25/+10
* Update to KDE 3.4Michael Nottebrock2005-03-214-62/+270
* - Update MASTER_SITES, WWWPav Lucistnik2005-02-162-2/+2
* - Update MASTER_SITES, WWWPav Lucistnik2005-02-162-2/+2
* Add i18nized doc subdirs to kdehier and adjust i18n port plists accordingly.Michael Nottebrock2004-12-232-2/+0
* - Use new support for plugin ports from textproc/jdictionaryHerve Quiroz2004-12-194-47/+10
* Fix some more plist nits.Michael Nottebrock2004-12-173-3/+0
* Fix kde3-i18n ports.Michael Nottebrock2004-12-162-4/+4
* Update to KDE 3.3.2Michael Nottebrock2004-12-149-13/+16
* Update to KDE 3.3.1Michael Nottebrock2004-11-084-7/+7
* Update to KDE 3.3Michael Nottebrock2004-08-317-21/+133
* Add slaves ports for Aspell's new dictionaries.Thierry Thomas2004-08-293-0/+22
* Factor out all but one of the build switches of the KDE main module portsMichael Nottebrock2004-08-112-3/+3
* Update to 1.0.R.1Tilman Keskinoz2004-08-10