summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJustyna Att Ilczuk <justyna.ilczuk@gmail.com>2012-12-10 09:43:16 +0100
committerJustyna Att Ilczuk <justyna.ilczuk@gmail.com>2012-12-10 09:43:16 +0100
commit9847a9ead0d4aa576674f8fabe0a5ddd39e0c672 (patch)
tree24f5358c6c97e58e37cb76f01e67a716d47a3886
parentc862bad33f7faf05482dae04ac000adf5550e2a6 (diff)
downloadsencha-lang-9847a9ead0d4aa576674f8fabe0a5ddd39e0c672.tar.gz
sencha-lang-9847a9ead0d4aa576674f8fabe0a5ddd39e0c672.tar.bz2
sencha-lang-9847a9ead0d4aa576674f8fabe0a5ddd39e0c672.tar.xz
sencha-lang-9847a9ead0d4aa576674f8fabe0a5ddd39e0c672.zip
Repeat works as it should. Assigning arguments to functions.
-rw-r--r--Sencha-lang/AST/ConstantExpression.cpp2
-rw-r--r--Sencha-lang/AST/PostfixExpression.cpp2
-rw-r--r--Sencha-lang/AST/WhileNode.cpp18
-rw-r--r--Sencha-lang/AST/WhileNode.h19
-rw-r--r--Sencha-lang/corebin23388160 -> 25026560 bytes
5 files changed, 39 insertions, 2 deletions
diff --git a/Sencha-lang/AST/ConstantExpression.cpp b/Sencha-lang/AST/ConstantExpression.cpp
index 74ac04f..aac85f9 100644
--- a/Sencha-lang/AST/ConstantExpression.cpp
+++ b/Sencha-lang/AST/ConstantExpression.cpp
@@ -43,7 +43,7 @@ SenchaObject ConstantExpression::evaluate()
{
if(value.name != "" && context != NULL)
{
- value = context->get(value.name);
+ return context->get(value.name);
}
return value;
}
diff --git a/Sencha-lang/AST/PostfixExpression.cpp b/Sencha-lang/AST/PostfixExpression.cpp
index 62b20fc..fbc48a5 100644
--- a/Sencha-lang/AST/PostfixExpression.cpp
+++ b/Sencha-lang/AST/PostfixExpression.cpp
@@ -42,7 +42,7 @@ void PostfixExpression::execute() {
{
auto value = argument->evaluate();
- std::cout << argument->evaluate().str();
+ std::cout << value.str();
}
std::cout << std::endl;
diff --git a/Sencha-lang/AST/WhileNode.cpp b/Sencha-lang/AST/WhileNode.cpp
new file mode 100644
index 0000000..b5b3ec4
--- /dev/null
+++ b/Sencha-lang/AST/WhileNode.cpp
@@ -0,0 +1,18 @@
+/*
+ * WhileNode.cpp
+ *
+ * Created on: Dec 10, 2012
+ * Author: attero
+ */
+
+#include "WhileNode.h"
+
+WhileNode::WhileNode() {
+ // TODO Auto-generated constructor stub
+
+}
+
+WhileNode::~WhileNode() {
+ // TODO Auto-generated destructor stub
+}
+
diff --git a/Sencha-lang/AST/WhileNode.h b/Sencha-lang/AST/WhileNode.h
new file mode 100644
index 0000000..a7f026b
--- /dev/null
+++ b/Sencha-lang/AST/WhileNode.h
@@ -0,0 +1,19 @@
+/*
+ * WhileNode.h
+ *
+ * Created on: Dec 10, 2012
+ * Author: attero
+ */
+
+#ifndef WHILENODE_H_
+#define WHILENODE_H_
+
+#include "ASTStatement.h"
+
+class WhileNode: public ASTStatement {
+public:
+ WhileNode();
+ virtual ~WhileNode();
+};
+
+#endif /* WHILENODE_H_ */
diff --git a/Sencha-lang/core b/Sencha-lang/core
index d9522ee..4cd02fe 100644
--- a/Sencha-lang/core
+++ b/Sencha-lang/core
Binary files differ