2012-12-03 22:40:47 +00:00
|
|
|
/*
|
|
|
|
* ASTProgram.h
|
|
|
|
*
|
|
|
|
* Created on: Nov 5, 2012
|
|
|
|
* Author: attero
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef PROGRAMNODE_H_
|
|
|
|
#define PROGRAMNODE_H_
|
|
|
|
#include <iostream>
|
|
|
|
#include "ASTNode.h"
|
|
|
|
#include "ASTStatement.h"
|
|
|
|
|
2012-12-28 10:41:43 +00:00
|
|
|
/**
|
|
|
|
* ProgramNode is always first node. It stores all statements.
|
|
|
|
*/
|
2012-12-03 22:40:47 +00:00
|
|
|
class ProgramNode : public ASTNode {
|
|
|
|
public:
|
|
|
|
ProgramNode();
|
2012-12-05 22:27:03 +00:00
|
|
|
void add_statement(ASTStatement * statement);
|
2012-12-03 22:40:47 +00:00
|
|
|
virtual ~ProgramNode();
|
2012-12-31 16:10:37 +00:00
|
|
|
virtual SenchaObject execute();
|
|
|
|
virtual SenchaObject execute_last();
|
2012-12-22 17:52:19 +00:00
|
|
|
virtual SenchaObject evaluate() { return evaluate_last(); }
|
|
|
|
SenchaObject evaluate_last();
|
2012-12-18 21:41:39 +00:00
|
|
|
virtual void accept(Visitor * visitor);
|
2012-12-03 22:40:47 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif /* PROGRAMNODE_H_ */
|