@tokens-studio/tokenscript-interpreter 0.36.2 → 0.36.3

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.
package/dist/cli.js CHANGED
@@ -12,7 +12,7 @@ import * as readlineSync from 'readline-sync';
12
12
 
13
13
  // package.json
14
14
  var package_default = {
15
- version: "0.36.1"};
15
+ version: "0.36.2"};
16
16
 
17
17
  // src/types.ts
18
18
  var SupportedFormats = /* @__PURE__ */ ((SupportedFormats2) => {
@@ -967,7 +967,10 @@ var ListImpl = {
967
967
  return new NumberSymbol(idx, config);
968
968
  },
969
969
  get(value, indexSymbol) {
970
- const index = indexSymbol.value;
970
+ let index = indexSymbol.value;
971
+ if (index < 0) {
972
+ index = value.length + index;
973
+ }
971
974
  if (isOutOfBounds(value, index)) {
972
975
  throw new InterpreterError("SYM_INDEX_OUT_OF_RANGE" /* INDEX_OUT_OF_RANGE */, {
973
976
  data: { operation: "get" }