@@ -104,14 +104,6 @@ export class EmitterLua {
104104 return true; \
105105 }; \
106106 \
107- __or = __or || function(left:object, right:object) { \
108- return __is_true(left) ? left : right; \
109- }; \
110- \
111- __and = __and || function(left:object, right:object) { \
112- return __is_true(left) ? right : left; \
113- }; \
114- \
115107 __not = __not || function(left:object) { \
116108 return __is_true(left) ? false : true; \
117109 }; \
@@ -153,14 +145,6 @@ export class EmitterLua {
153145 return false; \
154146 }; \
155147 \
156- __tostring = __tostring || function (v) { \
157- if (v === null || v === undefined) { \
158- return v; \
159- } \
160- \
161- return tostring(v); \
162- } \
163- \
164148 __equals = __equals || function (l, r) { \
165149 if (l === r) { \
166150 return true; \
@@ -2210,7 +2194,9 @@ export class EmitterLua {
22102194 this . functionContext . textCode . push ( "while __is_true(" )
22112195 }
22122196
2213- this . processExpression ( node . condition ) ;
2197+ if ( node . condition ) {
2198+ this . processExpression ( node . condition ) ;
2199+ }
22142200
22152201 if ( this . ignoreExtraLogic ) {
22162202 this . functionContext . textCode . pushNewLineIncrement ( " do" )
@@ -2226,7 +2212,10 @@ export class EmitterLua {
22262212 this . functionContext . textCode . pushNewLine ( "::continue::" )
22272213 }
22282214
2229- this . processExpression ( node . incrementor ) ;
2215+ if ( node . incrementor ) {
2216+ this . processExpression ( node . incrementor ) ;
2217+ }
2218+
22302219 this . functionContext . textCode . pushNewLine ( )
22312220
22322221 this . functionContext . textCode . push ( "end" )
0 commit comments