summaryrefslogtreecommitdiffstats
path: root/Sencha-lang/Parser.cpp
diff options
context:
space:
mode:
authorJustyna Att Ilczuk <justyna.ilczuk@gmail.com>2012-12-10 12:37:29 +0100
committerJustyna Att Ilczuk <justyna.ilczuk@gmail.com>2012-12-10 12:37:29 +0100
commitbc04b973776d1f78343862698e5450372360140f (patch)
tree33d6582fe76a7b1e9f560e6cf98788db3f93de56 /Sencha-lang/Parser.cpp
parent1eee8a00393958a83d316c5aa404a50c82f65704 (diff)
downloadsencha-lang-bc04b973776d1f78343862698e5450372360140f.tar.gz
sencha-lang-bc04b973776d1f78343862698e5450372360140f.tar.bz2
sencha-lang-bc04b973776d1f78343862698e5450372360140f.tar.xz
sencha-lang-bc04b973776d1f78343862698e5450372360140f.zip
While node works! != operator
Diffstat (limited to 'Sencha-lang/Parser.cpp')
-rw-r--r--Sencha-lang/Parser.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/Sencha-lang/Parser.cpp b/Sencha-lang/Parser.cpp
index b0f8910..70b775c 100644
--- a/Sencha-lang/Parser.cpp
+++ b/Sencha-lang/Parser.cpp
@@ -240,8 +240,12 @@ ASTStatement * Parser::statement(ASTNode * parent)
}
else if(accept("while"))
{
+ WhileNode * while_node = new WhileNode(parent);
+ while_node->add_condition(expr(while_node));
+ while_node->add_body(statement(while_node));
- return stat;
+ delete stat;
+ return while_node;
}
else if(accept("return"))
{