diff options
author | Christian <c@ethdev.com> | 2014-10-23 23:06:12 +0800 |
---|---|---|
committer | Christian <c@ethdev.com> | 2014-10-25 01:38:48 +0800 |
commit | b2f12991dbb30193386e6d3ff16e2fc46fa2289a (patch) | |
tree | bb23f19dc832daf8296bdbda9d2b95cba93414fb /ASTVisitor.h | |
parent | 59b5e950f42781c083d14a210845148b01e39eb2 (diff) | |
download | dexon-solidity-b2f12991dbb30193386e6d3ff16e2fc46fa2289a.tar.gz dexon-solidity-b2f12991dbb30193386e6d3ff16e2fc46fa2289a.tar.zst dexon-solidity-b2f12991dbb30193386e6d3ff16e2fc46fa2289a.zip |
Some documentation.
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; } |