summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJustyna Ilczuk <justyna.ilczuk@gmail.com>2012-12-17 09:37:45 +0100
committerJustyna Ilczuk <justyna.ilczuk@gmail.com>2012-12-17 09:37:45 +0100
commit46ac5b352b7668047c0ca19745f82b8dbd0c0270 (patch)
treeb37ae6f4cd73beee3e47733b203f575d4fc33cff
parent3ff8c49cb7659866f98562a089df488928b9db8a (diff)
downloadsencha-lang-46ac5b352b7668047c0ca19745f82b8dbd0c0270.tar.gz
sencha-lang-46ac5b352b7668047c0ca19745f82b8dbd0c0270.tar.bz2
sencha-lang-46ac5b352b7668047c0ca19745f82b8dbd0c0270.tar.xz
sencha-lang-46ac5b352b7668047c0ca19745f82b8dbd0c0270.zip
More on todos. Nothing important.
-rw-r--r--Sencha-lang/AST/AST.cpp3
-rw-r--r--Sencha-lang/AST/ASTNode.cpp2
-rw-r--r--Sencha-lang/AST/ASTStatement.cpp4
-rw-r--r--Sencha-lang/AST/Assignment.cpp1
-rw-r--r--Sencha-lang/AST/BasicExpression.cpp3
-rw-r--r--Sencha-lang/AST/BasicStatement.cpp6
-rw-r--r--Sencha-lang/AST/ConstantExpression.cpp2
-rw-r--r--Sencha-lang/AST/ProgramNode.cpp2
-rw-r--r--Sencha-lang/AST/SenchaObject.cpp2
-rw-r--r--Sencha-lang/Context.cpp2
-rw-r--r--Sencha-lang/Tests/TestLexer.cpp4
-rw-r--r--Sencha-lang/Tests/TestSuite.cpp2
-rw-r--r--Sencha-lang/Token.h4
13 files changed, 19 insertions, 18 deletions
diff --git a/Sencha-lang/AST/AST.cpp b/Sencha-lang/AST/AST.cpp
index 8c36289..0516c1b 100644
--- a/Sencha-lang/AST/AST.cpp
+++ b/Sencha-lang/AST/AST.cpp
@@ -16,7 +16,8 @@ AST::AST() {
void AST::delete_all_children()
{
- //TODO perform deleting
+ delete root;
+ root = NULL;
}
AST::~AST() {
diff --git a/Sencha-lang/AST/ASTNode.cpp b/Sencha-lang/AST/ASTNode.cpp
index 6ee2df0..d6bd441 100644
--- a/Sencha-lang/AST/ASTNode.cpp
+++ b/Sencha-lang/AST/ASTNode.cpp
@@ -12,6 +12,6 @@ ASTNode::ASTNode() {
}
ASTNode::~ASTNode() {
- // TODO Auto-generated destructor stub
+ // Do nothing
}
diff --git a/Sencha-lang/AST/ASTStatement.cpp b/Sencha-lang/AST/ASTStatement.cpp
index 52c5526..52ccad7 100644
--- a/Sencha-lang/AST/ASTStatement.cpp
+++ b/Sencha-lang/AST/ASTStatement.cpp
@@ -8,11 +8,11 @@
#include "ASTStatement.h"
ASTStatement::ASTStatement() {
- // TODO Auto-generated constructor stub
+ // Do nothing
}
ASTStatement::~ASTStatement() {
- // TODO Auto-generated destructor stub
+ // Do nothing
}
diff --git a/Sencha-lang/AST/Assignment.cpp b/Sencha-lang/AST/Assignment.cpp
index cc69bd6..b7761ef 100644
--- a/Sencha-lang/AST/Assignment.cpp
+++ b/Sencha-lang/AST/Assignment.cpp
@@ -53,7 +53,6 @@ void Assignment::add_lvalue(ASTExpression * left)
void Assignment::add_rvalue(ASTExpression * right)
{
- //TODO should note something if it doesn't look like that. Other possibilities like
if(children.size()==1)
children.push_back(right);
else if(children.size()>1)
diff --git a/Sencha-lang/AST/BasicExpression.cpp b/Sencha-lang/AST/BasicExpression.cpp
index 06c3f3b..ab38dde 100644
--- a/Sencha-lang/AST/BasicExpression.cpp
+++ b/Sencha-lang/AST/BasicExpression.cpp
@@ -99,8 +99,7 @@ BasicExpression::BasicExpression(ASTNode * parent) {
}
BasicExpression::~BasicExpression() {
- // TODO Auto-generated destructor stub
- // TODO free children memory
+ //Do nothing
}
diff --git a/Sencha-lang/AST/BasicStatement.cpp b/Sencha-lang/AST/BasicStatement.cpp
index 03fe6d8..88d70c2 100644
--- a/Sencha-lang/AST/BasicStatement.cpp
+++ b/Sencha-lang/AST/BasicStatement.cpp
@@ -12,7 +12,11 @@ BasicStatement::BasicStatement(ASTNode * parent) {
}
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)
diff --git a/Sencha-lang/AST/ConstantExpression.cpp b/Sencha-lang/AST/ConstantExpression.cpp
index aac85f9..25a3889 100644
--- a/Sencha-lang/AST/ConstantExpression.cpp
+++ b/Sencha-lang/AST/ConstantExpression.cpp
@@ -14,7 +14,7 @@ ConstantExpression::ConstantExpression(ASTNode * parent) {
}
ConstantExpression::~ConstantExpression() {
- // TODO Auto-generated destructor stub
+ // Do nothing
}
ConstantExpression::ConstantExpression(ASTNode * parent, SenchaObject value, std::string name)
diff --git a/Sencha-lang/AST/ProgramNode.cpp b/Sencha-lang/AST/ProgramNode.cpp
index 5ad337f..9d61a4d 100644
--- a/Sencha-lang/AST/ProgramNode.cpp
+++ b/Sencha-lang/AST/ProgramNode.cpp
@@ -8,7 +8,7 @@
#include "ProgramNode.h"
ProgramNode::ProgramNode() {
- // TODO Auto-generated constructor stub
+ //Do nothing
}
diff --git a/Sencha-lang/AST/SenchaObject.cpp b/Sencha-lang/AST/SenchaObject.cpp
index 8a75e0a..3edd088 100644
--- a/Sencha-lang/AST/SenchaObject.cpp
+++ b/Sencha-lang/AST/SenchaObject.cpp
@@ -12,7 +12,7 @@ SenchaObject::SenchaObject() {
}
SenchaObject::~SenchaObject() {
- // TODO Auto-generated destructor stub
+ // Do nothing
}
bool SenchaObject::is_true()
diff --git a/Sencha-lang/Context.cpp b/Sencha-lang/Context.cpp
index 46218d0..6d9face 100644
--- a/Sencha-lang/Context.cpp
+++ b/Sencha-lang/Context.cpp
@@ -8,12 +8,10 @@
#include "Context.h"
Context::Context() {
- // TODO Auto-generated constructor stub
index = 0;
}
Context::~Context() {
- // TODO Auto-generated destructor stub
}
void Context::register_function(std::string name, PointerToNativeFunction f)
diff --git a/Sencha-lang/Tests/TestLexer.cpp b/Sencha-lang/Tests/TestLexer.cpp
index 9c17052..1000652 100644
--- a/Sencha-lang/Tests/TestLexer.cpp
+++ b/Sencha-lang/Tests/TestLexer.cpp
@@ -9,12 +9,12 @@
TestLexer::TestLexer() {
- // TODO Auto-generated constructor stub
+ //Do nothing
}
TestLexer::~TestLexer() {
- // TODO Auto-generated destructor stub
+ // Do nothing
}
std::string TestLexer::all_tests()
diff --git a/Sencha-lang/Tests/TestSuite.cpp b/Sencha-lang/Tests/TestSuite.cpp
index bb1a3b1..3c37b25 100644
--- a/Sencha-lang/Tests/TestSuite.cpp
+++ b/Sencha-lang/Tests/TestSuite.cpp
@@ -17,7 +17,7 @@ TestSuite::TestSuite() {
TestSuite::~TestSuite() {
- // TODO Auto-generated destructor stub
+ //Do nothing
}
std::string TestSuite::all_tests()
diff --git a/Sencha-lang/Token.h b/Sencha-lang/Token.h
index 7c3552f..163f4de 100644
--- a/Sencha-lang/Token.h
+++ b/Sencha-lang/Token.h
@@ -6,8 +6,8 @@
using namespace std;
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
- //TODO implement t_float in lexer
+ t_punctuation, t_keyword, t_operator, t_float } type_of_token;
+
class Token