allow to call a function defined later in the source
[bosc.git] / src / ast.cpp
blob0778dbb209a4be6a0368893b6a49a6e74b30852d
1 #include <cassert>
2 #include "logging.h"
3 #include "ast.h"
5 void GlueOperator::traverseTree(std::vector<ASTNode*> &c, ASTNode* root)
7 if (root->getType() != this->getType()) {
8 c.push_back(root);
9 return;
11 GlueOperator *g = dynamic_cast<GlueOperator*>(root);
12 assert(g);
13 traverseTree(c, g->left);
14 traverseTree(c, g->right);