44 #ifndef SKIP_IN_DOXYGEN
AST nodes and attributes.
void(* Destructor)(void *)
Function pointer used to store references to custom "free" routines.
Definition: ast.h:23
Main AST node structure.
Definition: ast.h:466
Node visitor structure.
Definition: visitor.h:28
void * data
Visitor-specific state information.
Definition: visitor.h:32
Destructor dtor
Pointer to destructor function (used to deallocate the data member)
Definition: visitor.h:37
NodeVisitor * CalcDepthVisitor_new()
Create a new visitor that calculates node depths as attributes.
Definition: visitor.c:584
void NodeVisitor_free(NodeVisitor *visitor)
Deallocate a visitor structure.
Definition: visitor.c:188
struct NodeVisitor NodeVisitor
Node visitor structure.
void NodeVisitor_traverse_and_free(NodeVisitor *visitor, ASTNode *node)
Perform an AST traversal using the given visitor and then deallocate the visitor.
Definition: visitor.c:182
NodeVisitor * NodeVisitor_new()
Allocate a new generic visitor structure.
Definition: visitor.c:13
NodeVisitor * SetParentVisitor_new()
Create a new visitor that sets up parent pointers as attributes.
Definition: visitor.c:550
NodeVisitor * GenerateASTGraph_new(FILE *output)
Create a new AST debug graph output visitor.
Definition: visitor.c:455
NodeVisitor * PrintVisitor_new(FILE *output)
Create a new AST debug print visitor.
Definition: visitor.c:329
void NodeVisitor_traverse(NodeVisitor *visitor, ASTNode *node)
Perform an AST traversal using the given visitor.
Definition: visitor.c:60