@abaplint/runtime 2.11.21 → 2.11.23

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.
@@ -55,10 +55,23 @@ class Structure {
55
55
  return this.qualifiedName;
56
56
  }
57
57
  setField(name, value) {
58
- if (this.value[name] === undefined) {
59
- throw new Error("Structure, setField, field not found: " + name);
58
+ if (name.includes("->") || name.includes("=>")) {
59
+ throw new Error("transpiler, structure setField todo, " + name);
60
+ }
61
+ if (name.includes("-")) {
62
+ // hmm, todo
63
+ const [base, field] = name.split("-");
64
+ if (field.includes("-")) {
65
+ throw new Error("transpiler, structure setField todo");
66
+ }
67
+ this.value[base].setField(field, value);
68
+ }
69
+ else {
70
+ if (this.value[name] === undefined) {
71
+ throw new Error("Structure, setField, field not found: " + name);
72
+ }
73
+ this.value[name].set(value);
60
74
  }
61
- this.value[name].set(value);
62
75
  return this;
63
76
  }
64
77
  set(input) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/runtime",
3
- "version": "2.11.21",
3
+ "version": "2.11.23",
4
4
  "description": "Transpiler - Runtime",
5
5
  "main": "build/src/index.js",
6
6
  "typings": "build/src/index.d.ts",