@abaplint/transpiler 2.6.40 → 2.6.42

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.
@@ -501,21 +501,23 @@ class Traversal {
501
501
  static setValues(identifier, name) {
502
502
  const val = identifier.getValue();
503
503
  let ret = "";
504
- if (typeof val === "string") {
505
- const e = new expressions_1.ConstantTranspiler().escape(val);
506
- ret += name + ".set(" + e + ");\n";
507
- }
508
- else if (typeof val === "object") {
509
- const a = val;
510
- for (const v of Object.keys(val)) {
511
- let s = a[v];
512
- if (s === undefined) {
513
- continue;
504
+ const handle = (val, name) => {
505
+ if (typeof val === "string") {
506
+ const e = new expressions_1.ConstantTranspiler().escape(val);
507
+ ret += name + ".set(" + e + ");\n";
508
+ }
509
+ else if (typeof val === "object") {
510
+ const a = val;
511
+ for (const v of Object.keys(val)) {
512
+ const s = a[v];
513
+ if (s === undefined) {
514
+ continue;
515
+ }
516
+ handle(s, name + ".get()." + v);
514
517
  }
515
- s = new expressions_1.ConstantTranspiler().escape(s);
516
- ret += name + ".get()." + v + ".set(" + s + ");\n";
517
518
  }
518
- }
519
+ };
520
+ handle(val, name);
519
521
  return ret;
520
522
  }
521
523
  buildInternalName(name, def) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/transpiler",
3
- "version": "2.6.40",
3
+ "version": "2.6.42",
4
4
  "description": "Transpiler",
5
5
  "main": "build/src/index.js",
6
6
  "typings": "build/src/index.d.ts",
@@ -28,7 +28,7 @@
28
28
  "author": "abaplint",
29
29
  "license": "MIT",
30
30
  "dependencies": {
31
- "@abaplint/core": "^2.99.3",
31
+ "@abaplint/core": "^2.99.6",
32
32
  "source-map": "^0.7.4"
33
33
  },
34
34
  "devDependencies": {