Rewrite check for loops for break/continue under varying CF to use WalkAST()
This commit is contained in:
7
ast.cpp
7
ast.cpp
@@ -75,8 +75,11 @@ WalkAST(ASTNode *node, ASTCallBackFunc preFunc, ASTCallBackFunc postFunc,
|
||||
return;
|
||||
|
||||
// Call the callback function
|
||||
if (preFunc != NULL)
|
||||
preFunc(node, data);
|
||||
if (preFunc != NULL) {
|
||||
if (preFunc(node, data) == false)
|
||||
// The function asked us to not continue recursively, so stop.
|
||||
return;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
// Handle Statements
|
||||
|
||||
Reference in New Issue
Block a user