diff options
Diffstat (limited to 'ASTVisitor.h')
-rw-r--r-- | ASTVisitor.h | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/ASTVisitor.h b/ASTVisitor.h index 72f28768..a667ad39 100644 --- a/ASTVisitor.h +++ b/ASTVisitor.h @@ -30,13 +30,15 @@ namespace dev namespace solidity { +/// Visitor interface for the abstract syntax tree. This class is tightly bound to the +/// implementation of @ref ASTNode::accept and its overrides. After a call to +/// @ref ASTNode::accept, the function visit for the appropriate parameter is called and then +/// (if it returns true) this continues recursively for all child nodes in document order +/// (there is an exception for contracts). After all child nodes have been visited, endVisit is +/// called for the node. class ASTVisitor { public: - /// These functions are called after a call to ASTNode::accept, - /// first visit, then (if visit returns true) recursively for all - /// child nodes in document order (exception for contracts) and then - /// endVisit. virtual bool visit(ASTNode&) { return true; } virtual bool visit(ContractDefinition&) { return true; } virtual bool visit(StructDefinition&) { return true; } |