aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity/analysis/SyntaxChecker.h
diff options
context:
space:
mode:
authorLu Guanqun <guanqun.lu@gmail.com>2016-01-19 10:16:13 +0800
committerLu Guanqun <guanqun.lu@gmail.com>2016-01-19 10:16:13 +0800
commitc8886ed5cfc4f0b7bf4e8d52eb94da7137c9b70e (patch)
tree1c8d6e62a0ba7d9a7ef00608548295ae01d97d4f /libsolidity/analysis/SyntaxChecker.h
parente130bc7e7cc647b15c448133f725a060910da587 (diff)
downloaddexon-solidity-c8886ed5cfc4f0b7bf4e8d52eb94da7137c9b70e.tar.gz
dexon-solidity-c8886ed5cfc4f0b7bf4e8d52eb94da7137c9b70e.tar.zst
dexon-solidity-c8886ed5cfc4f0b7bf4e8d52eb94da7137c9b70e.zip
code changes according to Chris's comments
Diffstat (limited to 'libsolidity/analysis/SyntaxChecker.h')
-rw-r--r--libsolidity/analysis/SyntaxChecker.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/libsolidity/analysis/SyntaxChecker.h b/libsolidity/analysis/SyntaxChecker.h
index 66f6d94d..c836d49f 100644
--- a/libsolidity/analysis/SyntaxChecker.h
+++ b/libsolidity/analysis/SyntaxChecker.h
@@ -32,7 +32,7 @@ namespace solidity
* The module that performs syntax analysis on the AST:
* - whether continue/break is in a for/while loop.
*/
-class SyntaxChecker : private ASTConstVisitor
+class SyntaxChecker: private ASTConstVisitor
{
public:
/// @param _errors the reference to the list of errors and warnings to add them found during type checking.
@@ -45,13 +45,16 @@ private:
void syntaxError(SourceLocation const& _location, std::string const& _description);
virtual bool visit(WhileStatement const& _whileStatement) override;
+ virtual void endVisit(WhileStatement const& _whileStatement) override;
virtual bool visit(ForStatement const& _forStatement) override;
- virtual bool visit(Block const& _blockStatement) override;
- virtual bool visit(IfStatement const& _ifStatement) override;
+ virtual void endVisit(ForStatement const& _forStatement) override;
+
virtual bool visit(Continue const& _continueStatement) override;
virtual bool visit(Break const& _breakStatement) override;
ErrorList& m_errors;
+
+ int m_inLoopDepth = 0;
};
}