Fix case_statement/lambda-close-over-variables bug, rename ast_node file to make ast_node:: unambigious, change test_ast to test_compiler and add a little skeleton c_generator file
This commit is contained in:
@@ -36,11 +36,13 @@ NodeTree<T>* RemovalTransformation<T>::transform(NodeTree<T>* from) {
|
||||
while(!toProcess.empty()) {
|
||||
NodeTree<T>* node = toProcess.front();
|
||||
toProcess.pop();
|
||||
if (!node)
|
||||
continue;
|
||||
std::vector<NodeTree<T>*> children = node->getChildren();
|
||||
for (int i = 0; i < children.size(); i++) {
|
||||
if (children[i]->getData() == toRemove)
|
||||
node->removeChild(children[i]);
|
||||
else
|
||||
else if (children[i])
|
||||
toProcess.push(children[i]);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user