circuitscript 0.0.26 → 0.0.27

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -19,7 +19,8 @@ class BaseVisitor extends CircuitScriptVisitor_1.CircuitScriptVisitor {
19
19
  this.silent = false;
20
20
  this.printStream = [];
21
21
  this.printToConsole = true;
22
- this.acceptedDirections = ['left', 'right', 'up', 'down'];
22
+ this.acceptedDirections = [types_1.Direction.Up, types_1.Direction.Down,
23
+ types_1.Direction.Right, types_1.Direction.Left];
23
24
  this.acceptedFlip = ['flipX', 'flipY'];
24
25
  this.resultData = new Map;
25
26
  this.paramData = new Map;
@@ -416,6 +417,11 @@ class BaseVisitor extends CircuitScriptVisitor_1.CircuitScriptVisitor {
416
417
  }
417
418
  }
418
419
  }
420
+ else if (tmpPassedInArgs[0] === 'keyword') {
421
+ const variableName = tmpPassedInArgs[1];
422
+ executor.log('set variable in scope, var name: ', variableName);
423
+ executor.scope.variables.set(variableName, tmpPassedInArgs[2]);
424
+ }
419
425
  }
420
426
  else if (tmpFuncArg.length === 2) {
421
427
  const variableName = tmpFuncArg[0];