@abaplint/transpiler-cli 2.11.18 → 2.11.19

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.
Files changed (2) hide show
  1. package/build/bundle.js +13 -1
  2. package/package.json +2 -2
package/build/bundle.js CHANGED
@@ -81222,6 +81222,7 @@ const core_1 = __webpack_require__(/*! @abaplint/core */ "./node_modules/@abapli
81222
81222
  const chunk_1 = __webpack_require__(/*! ../chunk */ "./node_modules/@abaplint/transpiler/build/src/chunk.js");
81223
81223
  const transpile_types_1 = __webpack_require__(/*! ../transpile_types */ "./node_modules/@abaplint/transpiler/build/src/transpile_types.js");
81224
81224
  const field_assignment_1 = __webpack_require__(/*! ./field_assignment */ "./node_modules/@abaplint/transpiler/build/src/expressions/field_assignment.js");
81225
+ const source_1 = __webpack_require__(/*! ./source */ "./node_modules/@abaplint/transpiler/build/src/expressions/source.js");
81225
81226
  class ValueBodyLineTranspiler {
81226
81227
  transpile(rowType, line, traversal, extraFields) {
81227
81228
  const ret = new chunk_1.Chunk();
@@ -81234,8 +81235,12 @@ class ValueBodyLineTranspiler {
81234
81235
  else if (child.get() instanceof core_1.Expressions.FieldAssignment && child instanceof core_1.Nodes.ExpressionNode) {
81235
81236
  ret.appendString(new field_assignment_1.FieldAssignmentTranspiler().transpile(child, traversal).getCode());
81236
81237
  }
81238
+ else if (child.get() instanceof core_1.Expressions.Source && child instanceof core_1.Nodes.ExpressionNode) {
81239
+ // then its a non structured/ table line kind of thing
81240
+ ret.appendString(".set(" + new source_1.SourceTranspiler().transpile(child, traversal).getCode() + ")");
81241
+ }
81237
81242
  else {
81238
- throw new Error("ValueBodyLineTranspiler, unknown " + child.get().constructor.name);
81243
+ throw new Error("ValueBodyLineTranspiler, unknown " + child.get().constructor.name + " " + line.concatTokens());
81239
81244
  }
81240
81245
  }
81241
81246
  ret.appendString(extraFields + `)`);
@@ -90613,6 +90618,13 @@ this.INTERNAL_ID = abap.internalIdCounter++;\n`;
90613
90618
  if (dtel) {
90614
90619
  return dtel.parseType(this.reg);
90615
90620
  }
90621
+ if (name.includes("=>")) {
90622
+ const [className, typeName] = name.split("=>");
90623
+ const cls = this.findClassDefinition(className, scope);
90624
+ if (cls) {
90625
+ return cls.getTypeDefinitions().getByName(typeName)?.getType();
90626
+ }
90627
+ }
90616
90628
  // todo: yea, well, yea
90617
90629
  throw new Error("lookupType, type not found, " + node.concatTokens());
90618
90630
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/transpiler-cli",
3
- "version": "2.11.18",
3
+ "version": "2.11.19",
4
4
  "description": "Transpiler - Command Line Interface",
5
5
  "funding": "https://github.com/sponsors/larshp",
6
6
  "bin": {
@@ -28,7 +28,7 @@
28
28
  "license": "MIT",
29
29
  "devDependencies": {
30
30
  "@abaplint/core": "^2.113.166",
31
- "@abaplint/transpiler": "^2.11.18",
31
+ "@abaplint/transpiler": "^2.11.19",
32
32
  "@types/glob": "^8.1.0",
33
33
  "@types/node": "^24.2.1",
34
34
  "@types/progress": "^2.0.7",