summaryrefslogtreecommitdiff
path: root/src/scriptengine.cpp
diff options
context:
space:
mode:
authorMike Buland <eichlan@xagasoft.com>2016-12-01 11:54:52 -0700
committerMike Buland <eichlan@xagasoft.com>2016-12-01 11:54:52 -0700
commit17a39c19e5bff97c3b3d2bc888a3bb5ded7c1b96 (patch)
tree77ed32bfbcfc84ae5ebf2da468d6cca47796dc55 /src/scriptengine.cpp
parent32b48aeb75db4ad40fe0173614e585f9bee72257 (diff)
downloadclic-17a39c19e5bff97c3b3d2bc888a3bb5ded7c1b96.tar.gz
clic-17a39c19e5bff97c3b3d2bc888a3bb5ded7c1b96.tar.bz2
clic-17a39c19e5bff97c3b3d2bc888a3bb5ded7c1b96.tar.xz
clic-17a39c19e5bff97c3b3d2bc888a3bb5ded7c1b96.zip
Terrible parsing issues are behind us now.
At least...those issues are behind us. We'll see what happens next. Also, added some macros to make debugging easily optional.
Diffstat (limited to '')
-rw-r--r--src/scriptengine.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/scriptengine.cpp b/src/scriptengine.cpp
index b828409..65b6ec2 100644
--- a/src/scriptengine.cpp
+++ b/src/scriptengine.cpp
@@ -57,32 +57,32 @@ Number ScriptEngine::exec( Expression *pExpr )
57 57
58 case Token::tPlus: 58 case Token::tPlus:
59 { 59 {
60 Number a = sNums.peekPop();
61 Number b = sNums.peekPop(); 60 Number b = sNums.peekPop();
61 Number a = sNums.peekPop();
62 sNums.push( a + b ); 62 sNums.push( a + b );
63 } 63 }
64 break; 64 break;
65 65
66 case Token::tMinus: 66 case Token::tMinus:
67 { 67 {
68 Number a = sNums.peekPop();
69 Number b = sNums.peekPop(); 68 Number b = sNums.peekPop();
69 Number a = sNums.peekPop();
70 sNums.push( a - b ); 70 sNums.push( a - b );
71 } 71 }
72 break; 72 break;
73 73
74 case Token::tDivide: 74 case Token::tDivide:
75 { 75 {
76 Number a = sNums.peekPop();
77 Number b = sNums.peekPop(); 76 Number b = sNums.peekPop();
77 Number a = sNums.peekPop();
78 sNums.push( a / b ); 78 sNums.push( a / b );
79 } 79 }
80 break; 80 break;
81 81
82 case Token::tMultiply: 82 case Token::tMultiply:
83 { 83 {
84 Number a = sNums.peekPop();
85 Number b = sNums.peekPop(); 84 Number b = sNums.peekPop();
85 Number a = sNums.peekPop();
86 sNums.push( a * b ); 86 sNums.push( a * b );
87 } 87 }
88 break; 88 break;