void StatementNode::Traverse(CodeGenerator &gen) { gen.Visit(this); std::vector<ProgramNode*>::iterator it = nodes_.begin(), it_end = nodes_.end(); for(;it != it_end; ++it) { (*it)->Traverse(gen); } }
void ExpressionNode::Traverse (CodeGenerator& cg) { cg.Visit(this); ListIterator<ProgramNode*> i(_children); for (i.First(); !i.IsDone(); i.Next()) { i.CurrentItem()->Traverse(cg); } }