@abaplint/transpiler-cli 2.6.18 → 2.6.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 +9 -7
  2. package/package.json +2 -2
package/build/bundle.js CHANGED
@@ -71298,12 +71298,10 @@ class AssignTranspiler {
71298
71298
  const firstFirst = first.getChildren()[1];
71299
71299
  if ((firstFirst === null || firstFirst === void 0 ? void 0 : firstFirst.get()) instanceof abaplint.Expressions.Constant) {
71300
71300
  const s = (_b = firstFirst.getFirstToken().getStr().toLowerCase().match(/\w+/)) === null || _b === void 0 ? void 0 : _b.toString();
71301
- if (s === "me") {
71302
- options.push(`dynamicSource: this.me`);
71303
- }
71304
- else {
71305
- options.push(`dynamicSource: (() => {try { return ${s}; } catch {}})()`);
71306
- }
71301
+ options.push(`dynamicSource: (() => {
71302
+ try { return ${s}; } catch {}
71303
+ try { return this.${s}; } catch {}
71304
+ })()`);
71307
71305
  }
71308
71306
  else if ((firstFirst === null || firstFirst === void 0 ? void 0 : firstFirst.get()) instanceof abaplint.Expressions.FieldChain && firstFirst instanceof abaplint.Nodes.ExpressionNode) {
71309
71307
  const code = new expressions_1.FieldChainTranspiler(true).transpile(firstFirst, traversal).getCode();
@@ -71315,7 +71313,11 @@ class AssignTranspiler {
71315
71313
  }
71316
71314
  }
71317
71315
  else if ((first === null || first === void 0 ? void 0 : first.get()) instanceof abaplint.Expressions.Source && first instanceof abaplint.Nodes.ExpressionNode) {
71318
- options.push(`dynamicSource: (() => {try { return ${first.concatTokens()}; } catch {}})()`);
71316
+ const name = first.concatTokens().toLowerCase();
71317
+ options.push(`dynamicSource: (() => {
71318
+ try { return ${name}; } catch {}
71319
+ try { return this.${name}; } catch {}
71320
+ })()`);
71319
71321
  }
71320
71322
  }
71321
71323
  if (concat.endsWith(" CASTING.") || concat.includes(" CASTING TYPE ")) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/transpiler-cli",
3
- "version": "2.6.18",
3
+ "version": "2.6.19",
4
4
  "description": "Transpiler - Command Line Interface",
5
5
  "bin": {
6
6
  "abap_transpile": "./abap_transpile"
@@ -25,7 +25,7 @@
25
25
  "author": "abaplint",
26
26
  "license": "MIT",
27
27
  "devDependencies": {
28
- "@abaplint/transpiler": "^2.6.18",
28
+ "@abaplint/transpiler": "^2.6.19",
29
29
  "@types/glob": "^7.2.0",
30
30
  "glob": "=7.2.0",
31
31
  "@types/progress": "^2.0.5",