2012-11-17 16:02:32 +00:00
|
|
|
/*
|
|
|
|
* AST.cpp
|
|
|
|
*
|
|
|
|
* Created on: Nov 4, 2012
|
|
|
|
* Author: attero
|
|
|
|
*/
|
|
|
|
#include "AST.h"
|
|
|
|
#include "AllTypesOfASTNodes.h"
|
|
|
|
|
|
|
|
AST::AST() {
|
2012-12-03 22:40:47 +00:00
|
|
|
root = new ProgramNode();
|
2012-11-17 16:02:32 +00:00
|
|
|
current_node = root;
|
|
|
|
number_of_nodes = 1;
|
|
|
|
level_of_depth = 0;
|
|
|
|
}
|
|
|
|
|
2012-12-07 15:58:27 +00:00
|
|
|
void AST::delete_all_children()
|
|
|
|
{
|
2012-12-17 08:37:45 +00:00
|
|
|
delete root;
|
|
|
|
root = NULL;
|
2012-12-07 15:58:27 +00:00
|
|
|
}
|
|
|
|
|
2012-11-17 16:02:32 +00:00
|
|
|
AST::~AST() {
|
|
|
|
}
|
|
|
|
|