More on todos. Nothing important.
parent
3ff8c49cb7
commit
46ac5b352b
|
@ -16,7 +16,8 @@ AST::AST() {
|
||||||
|
|
||||||
void AST::delete_all_children()
|
void AST::delete_all_children()
|
||||||
{
|
{
|
||||||
//TODO perform deleting
|
delete root;
|
||||||
|
root = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
AST::~AST() {
|
AST::~AST() {
|
||||||
|
|
|
@ -12,6 +12,6 @@ ASTNode::ASTNode() {
|
||||||
}
|
}
|
||||||
|
|
||||||
ASTNode::~ASTNode() {
|
ASTNode::~ASTNode() {
|
||||||
// TODO Auto-generated destructor stub
|
// Do nothing
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -8,11 +8,11 @@
|
||||||
#include "ASTStatement.h"
|
#include "ASTStatement.h"
|
||||||
|
|
||||||
ASTStatement::ASTStatement() {
|
ASTStatement::ASTStatement() {
|
||||||
// TODO Auto-generated constructor stub
|
// Do nothing
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ASTStatement::~ASTStatement() {
|
ASTStatement::~ASTStatement() {
|
||||||
// TODO Auto-generated destructor stub
|
// Do nothing
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -53,7 +53,6 @@ void Assignment::add_lvalue(ASTExpression * left)
|
||||||
|
|
||||||
void Assignment::add_rvalue(ASTExpression * right)
|
void Assignment::add_rvalue(ASTExpression * right)
|
||||||
{
|
{
|
||||||
//TODO should note something if it doesn't look like that. Other possibilities like
|
|
||||||
if(children.size()==1)
|
if(children.size()==1)
|
||||||
children.push_back(right);
|
children.push_back(right);
|
||||||
else if(children.size()>1)
|
else if(children.size()>1)
|
||||||
|
|
|
@ -99,8 +99,7 @@ BasicExpression::BasicExpression(ASTNode * parent) {
|
||||||
}
|
}
|
||||||
|
|
||||||
BasicExpression::~BasicExpression() {
|
BasicExpression::~BasicExpression() {
|
||||||
// TODO Auto-generated destructor stub
|
//Do nothing
|
||||||
// TODO free children memory
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -12,7 +12,11 @@ BasicStatement::BasicStatement(ASTNode * parent) {
|
||||||
}
|
}
|
||||||
|
|
||||||
BasicStatement::~BasicStatement() {
|
BasicStatement::~BasicStatement() {
|
||||||
// TODO Auto-generated destructor stub
|
for(auto it = children.begin(); it != children.end(); )
|
||||||
|
{
|
||||||
|
delete *it;
|
||||||
|
it = children.erase(it);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void BasicStatement::add_expression(ASTExpression * expr)
|
void BasicStatement::add_expression(ASTExpression * expr)
|
||||||
|
|
|
@ -14,7 +14,7 @@ ConstantExpression::ConstantExpression(ASTNode * parent) {
|
||||||
}
|
}
|
||||||
|
|
||||||
ConstantExpression::~ConstantExpression() {
|
ConstantExpression::~ConstantExpression() {
|
||||||
// TODO Auto-generated destructor stub
|
// Do nothing
|
||||||
}
|
}
|
||||||
|
|
||||||
ConstantExpression::ConstantExpression(ASTNode * parent, SenchaObject value, std::string name)
|
ConstantExpression::ConstantExpression(ASTNode * parent, SenchaObject value, std::string name)
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
#include "ProgramNode.h"
|
#include "ProgramNode.h"
|
||||||
|
|
||||||
ProgramNode::ProgramNode() {
|
ProgramNode::ProgramNode() {
|
||||||
// TODO Auto-generated constructor stub
|
//Do nothing
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -12,7 +12,7 @@ SenchaObject::SenchaObject() {
|
||||||
}
|
}
|
||||||
|
|
||||||
SenchaObject::~SenchaObject() {
|
SenchaObject::~SenchaObject() {
|
||||||
// TODO Auto-generated destructor stub
|
// Do nothing
|
||||||
}
|
}
|
||||||
|
|
||||||
bool SenchaObject::is_true()
|
bool SenchaObject::is_true()
|
||||||
|
|
|
@ -8,12 +8,10 @@
|
||||||
#include "Context.h"
|
#include "Context.h"
|
||||||
|
|
||||||
Context::Context() {
|
Context::Context() {
|
||||||
// TODO Auto-generated constructor stub
|
|
||||||
index = 0;
|
index = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
Context::~Context() {
|
Context::~Context() {
|
||||||
// TODO Auto-generated destructor stub
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Context::register_function(std::string name, PointerToNativeFunction f)
|
void Context::register_function(std::string name, PointerToNativeFunction f)
|
||||||
|
|
|
@ -9,12 +9,12 @@
|
||||||
|
|
||||||
|
|
||||||
TestLexer::TestLexer() {
|
TestLexer::TestLexer() {
|
||||||
// TODO Auto-generated constructor stub
|
//Do nothing
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
TestLexer::~TestLexer() {
|
TestLexer::~TestLexer() {
|
||||||
// TODO Auto-generated destructor stub
|
// Do nothing
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string TestLexer::all_tests()
|
std::string TestLexer::all_tests()
|
||||||
|
|
|
@ -17,7 +17,7 @@ TestSuite::TestSuite() {
|
||||||
|
|
||||||
|
|
||||||
TestSuite::~TestSuite() {
|
TestSuite::~TestSuite() {
|
||||||
// TODO Auto-generated destructor stub
|
//Do nothing
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string TestSuite::all_tests()
|
std::string TestSuite::all_tests()
|
||||||
|
|
|
@ -6,8 +6,8 @@
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
typedef enum { t_invalid_token=0, t_symbol, t_integer, t_literal,
|
typedef enum { t_invalid_token=0, t_symbol, t_integer, t_literal,
|
||||||
t_punctuation, t_keyword, t_operator, t_float } type_of_token; //t_float not implemented
|
t_punctuation, t_keyword, t_operator, t_float } type_of_token;
|
||||||
//TODO implement t_float in lexer
|
|
||||||
|
|
||||||
|
|
||||||
class Token
|
class Token
|
||||||
|
|
Loading…
Reference in New Issue