diff options
author | chriseth <chris@ethereum.org> | 2017-10-06 19:50:15 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-10-06 19:50:15 +0800 |
commit | 094012dbb046655ac0291f6c4632f306406c0ada (patch) | |
tree | 56f31dfd7a35727b7781db63253e7037395d8337 /libsolidity/analysis/ConstantEvaluator.h | |
parent | 961f8746ffb169b564ac625a3cb0b215ec671757 (diff) | |
parent | 475b81880185e816db9a962a06cb3c323b953a90 (diff) | |
download | dexon-solidity-094012dbb046655ac0291f6c4632f306406c0ada.tar dexon-solidity-094012dbb046655ac0291f6c4632f306406c0ada.tar.gz dexon-solidity-094012dbb046655ac0291f6c4632f306406c0ada.tar.bz2 dexon-solidity-094012dbb046655ac0291f6c4632f306406c0ada.tar.lz dexon-solidity-094012dbb046655ac0291f6c4632f306406c0ada.tar.xz dexon-solidity-094012dbb046655ac0291f6c4632f306406c0ada.tar.zst dexon-solidity-094012dbb046655ac0291f6c4632f306406c0ada.zip |
Merge pull request #3036 from ethereum/constant-eval-refactor
Refactor error reporting in ConstantEvaluator
Diffstat (limited to 'libsolidity/analysis/ConstantEvaluator.h')
-rw-r--r-- | libsolidity/analysis/ConstantEvaluator.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/libsolidity/analysis/ConstantEvaluator.h b/libsolidity/analysis/ConstantEvaluator.h index 9ec04ebe..90bceb5d 100644 --- a/libsolidity/analysis/ConstantEvaluator.h +++ b/libsolidity/analysis/ConstantEvaluator.h @@ -29,6 +29,7 @@ namespace dev namespace solidity { +class ErrorReporter; class TypeChecker; /** @@ -37,13 +38,18 @@ class TypeChecker; class ConstantEvaluator: private ASTConstVisitor { public: - ConstantEvaluator(Expression const& _expr) { _expr.accept(*this); } + ConstantEvaluator(Expression const& _expr, ErrorReporter& _errorReporter): + m_errorReporter(_errorReporter) + { + _expr.accept(*this); + } private: virtual void endVisit(BinaryOperation const& _operation); virtual void endVisit(UnaryOperation const& _operation); virtual void endVisit(Literal const& _literal); + ErrorReporter& m_errorReporter; }; } |