node_children = new list<AST*>();
}
+AST::AST(Token tok)
+{
+ node_type = tok.type();
+ node_text = tok.text();
+ node_children = new list<AST*>();
+}
+
AST::AST(ASTNodeType type, const char* text)
{
node_type = type;
#include <stdarg.h>
#include <list>
#include <string>
+#include "token.h"
typedef unsigned int ASTNodeType;
std::list<AST*>* node_children;
public:
AST(ASTNodeType type);
+ AST(Token tok);
AST(ASTNodeType type, const char* text);
AST(ASTNodeType type, std::string text);
AST(ASTNodeType type, int child_count, ...);