Browse Source

bug fixed: for expression

Igor 2 years ago
parent
commit
d140db376e
1 changed files with 6 additions and 1 deletions
  1. 6 1
      js/util/codeParser.js

+ 6 - 1
js/util/codeParser.js

@@ -273,7 +273,12 @@ function parseRepeatNTimes(command, function_obj) {
   expression1 = expression1[0];
 
   var expression2 = CodeParser.expressionParserCodeVisual(command.condition, function_obj);
-  expression2 = expression2[0];
+
+  if (expression2[0].item == 'minus') {
+    expression2 = expression2[1];
+    expression2.content *= -1;
+  } else
+    expression2 = expression2[0];
 
   var var_step = CodeParser.expressionParserCodeVisual(command.step_expression, function_obj);