summaryrefslogtreecommitdiffstats
path: root/Sencha-lang
diff options
context:
space:
mode:
authorJustyna Ilczuk <justyna.ilczuk@gmail.com>2012-12-22 15:48:26 +0100
committerJustyna Ilczuk <justyna.ilczuk@gmail.com>2012-12-22 15:48:26 +0100
commit4b8baa58e6c791102f08958cac974241ea9dfe6b (patch)
treecab6c76f42b6744cfd6b971c5e77b581caae4576 /Sencha-lang
parenteed99251607f90025d6d11c2077fcd09d0ade8b9 (diff)
downloadsencha-lang-4b8baa58e6c791102f08958cac974241ea9dfe6b.tar.gz
sencha-lang-4b8baa58e6c791102f08958cac974241ea9dfe6b.tar.bz2
sencha-lang-4b8baa58e6c791102f08958cac974241ea9dfe6b.zip
First steps to logical operators.
Diffstat (limited to 'Sencha-lang')
-rw-r--r--Sencha-lang/AST/BasicExpression.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/Sencha-lang/AST/BasicExpression.cpp b/Sencha-lang/AST/BasicExpression.cpp
index b67ab5f..b778aae 100644
--- a/Sencha-lang/AST/BasicExpression.cpp
+++ b/Sencha-lang/AST/BasicExpression.cpp
@@ -106,6 +106,15 @@ SenchaObject BasicExpression::evaluate()
{
so = SenchaObject(left < right);
}
+ //TODO actually those should get through parser
+ else if(oper == "&&")
+ {
+ so = SenchaObject(left.is_true() && right.is_true());
+ }
+ else if(oper == "||")
+ {
+ so = SenchaObject(left.is_true() || right.is_true());
+ }
return so;
}