aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity/analysis/ReferencesResolver.h
diff options
context:
space:
mode:
authorLianaHus <liana@ethdev.com>2015-11-07 00:22:46 +0800
committerLianaHus <liana@ethdev.com>2015-11-07 01:45:06 +0800
commit7eb162c0df52fc6335613f00e9d105fe2a4df7ff (patch)
tree41f3855a4a94dda669053f17306ec9e7f5ace34e /libsolidity/analysis/ReferencesResolver.h
parent79177de80b83eeecc41f49690c0e70485d75937f (diff)
downloaddexon-solidity-7eb162c0df52fc6335613f00e9d105fe2a4df7ff.tar
dexon-solidity-7eb162c0df52fc6335613f00e9d105fe2a4df7ff.tar.gz
dexon-solidity-7eb162c0df52fc6335613f00e9d105fe2a4df7ff.tar.bz2
dexon-solidity-7eb162c0df52fc6335613f00e9d105fe2a4df7ff.tar.lz
dexon-solidity-7eb162c0df52fc6335613f00e9d105fe2a4df7ff.tar.xz
dexon-solidity-7eb162c0df52fc6335613f00e9d105fe2a4df7ff.tar.zst
dexon-solidity-7eb162c0df52fc6335613f00e9d105fe2a4df7ff.zip
fix
Diffstat (limited to 'libsolidity/analysis/ReferencesResolver.h')
-rw-r--r--libsolidity/analysis/ReferencesResolver.h15
1 files changed, 11 insertions, 4 deletions
diff --git a/libsolidity/analysis/ReferencesResolver.h b/libsolidity/analysis/ReferencesResolver.h
index 34e68054..237d01a0 100644
--- a/libsolidity/analysis/ReferencesResolver.h
+++ b/libsolidity/analysis/ReferencesResolver.h
@@ -60,7 +60,7 @@ public:
bool resolve(ASTNode& _root)
{
_root.accept(*this);
- return Error::containsOnlyWarnings(m_errors);
+ return !m_errorOccurred;
}
private:
@@ -73,16 +73,23 @@ private:
TypePointer typeFor(TypeName const& _typeName);
/// Adds a new error to the list of errors.
- void typeError(SourceLocation const& _location, std::string const& _description);
+ 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);
+ void TypeFatalError(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 DeclarationFatalError(const SourceLocation& _location, std::string const& _description);
ErrorList& m_errors;
NameAndTypeResolver& m_resolver;
ContractDefinition const* m_currentContract;
ParameterList const* m_returnParameters;
- bool m_resolveInsideCode;
+ bool const m_resolveInsideCode;
+ bool m_errorOccurred = false;
};
}