diff options
author | Christian Parpart <christian@ethereum.org> | 2018-11-15 00:11:55 +0800 |
---|---|---|
committer | Alex Beregszaszi <alex@rtfs.hu> | 2018-11-22 03:13:44 +0800 |
commit | d67322a1861d60a88151f7c25d6c3478a9a39acf (patch) | |
tree | af485e48c3436cd24e2db09a6a1bcf445605bae1 /libsolidity/analysis/ReferencesResolver.h | |
parent | 80371e2d25ce3eb868d6f75b99a54af9dc6c1583 (diff) | |
download | dexon-solidity-d67322a1861d60a88151f7c25d6c3478a9a39acf.tar.gz dexon-solidity-d67322a1861d60a88151f7c25d6c3478a9a39acf.tar.zst dexon-solidity-d67322a1861d60a88151f7c25d6c3478a9a39acf.zip |
Introduce namespace `langutil` in liblangutil directory.
Also:
- Use {}-style list initialisation for SourceLocation construction
- Introduce new system includes
- Changes the API of the Scanner to take source as value (with move) as opposed to as a reference
Diffstat (limited to 'libsolidity/analysis/ReferencesResolver.h')
-rw-r--r-- | libsolidity/analysis/ReferencesResolver.h | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/libsolidity/analysis/ReferencesResolver.h b/libsolidity/analysis/ReferencesResolver.h index 34dbca96..32c0553f 100644 --- a/libsolidity/analysis/ReferencesResolver.h +++ b/libsolidity/analysis/ReferencesResolver.h @@ -28,12 +28,17 @@ #include <libsolidity/ast/ASTVisitor.h> #include <libsolidity/ast/ASTAnnotations.h> +namespace langutil +{ +class ErrorReporter; +struct SourceLocation; +} + namespace dev { namespace solidity { -class ErrorReporter; class NameAndTypeResolver; /** @@ -44,7 +49,7 @@ class ReferencesResolver: private ASTConstVisitor { public: ReferencesResolver( - ErrorReporter& _errorReporter, + langutil::ErrorReporter& _errorReporter, NameAndTypeResolver& _resolver, bool _resolveInsideCode = false ): @@ -77,18 +82,18 @@ private: void endVisit(VariableDeclaration const& _variable) override; /// Adds a new error to the list of errors. - void typeError(SourceLocation const& _location, std::string const& _description); + void typeError(langutil::SourceLocation const& _location, std::string const& _description); /// Adds a new error to the list of errors and throws to abort reference resolving. - void fatalTypeError(SourceLocation const& _location, std::string const& _description); + void fatalTypeError(langutil::SourceLocation const& _location, std::string const& _description); /// Adds a new error to the list of errors. - void declarationError(SourceLocation const& _location, std::string const& _description); + void declarationError(langutil::SourceLocation const& _location, std::string const& _description); /// Adds a new error to the list of errors and throws to abort reference resolving. - void fatalDeclarationError(SourceLocation const& _location, std::string const& _description); + void fatalDeclarationError(langutil::SourceLocation const& _location, std::string const& _description); - ErrorReporter& m_errorReporter; + langutil::ErrorReporter& m_errorReporter; NameAndTypeResolver& m_resolver; /// Stack of return parameters. std::vector<ParameterList const*> m_returnParameters; |