@abaplint/transpiler-cli 2.10.33 → 2.10.35

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 -8
  2. package/package.json +3 -3
package/build/bundle.js CHANGED
@@ -78593,7 +78593,7 @@ class MethodSourceTranspiler {
78593
78593
  }
78594
78594
  else if (child.get() instanceof core_1.Expressions.Dynamic) {
78595
78595
  const second = child.getChildren()[1];
78596
- const lookupException = traversal.lookupClassOrInterface("'CX_SY_DYN_CALL_ILLEGAL_METHOD'", child.getFirstToken(), true);
78596
+ // const lookupException = traversal.lookupClassOrInterface("'CX_SY_DYN_CALL_ILLEGAL_METHOD'", child.getFirstToken(), true);
78597
78597
  if (second.get() instanceof core_1.Expressions.FieldChain && second instanceof core_1.Nodes.ExpressionNode) {
78598
78598
  if (call.endsWith(".")) {
78599
78599
  call = call.substring(0, call.length - 1);
@@ -78604,19 +78604,22 @@ class MethodSourceTranspiler {
78604
78604
  call = `abap.dynamicCallLookup(${call}, ${traversal.traverse(second).getCode()})`;
78605
78605
  }
78606
78606
  else if (second.get() instanceof core_1.Expressions.Constant) {
78607
- if (call === "") {
78608
- call = "this.";
78607
+ if (call.endsWith(".")) {
78608
+ call = call.substring(0, call.length - 1);
78609
78609
  }
78610
- else if (call.endsWith(".") === false) {
78611
- call += ".";
78610
+ if (call === "") {
78611
+ call = "this";
78612
78612
  }
78613
- call += second.getFirstToken().getStr().replace(/[\'\`]/g, "").toLowerCase().replace("~", "$").trimEnd();
78613
+ const methodName = second.getFirstToken().getStr().replace(/[\'\`]/g, "").toLowerCase().replace("~", "$").trimEnd();
78614
+ call = `abap.dynamicCallLookup(${call}, "${methodName}")`;
78614
78615
  }
78615
78616
  else {
78616
78617
  ret.appendString("MethodSourceTranspiler-Unexpected");
78617
78618
  }
78619
+ /*
78618
78620
  ret.appendString(`if (${call} === undefined && ${lookupException} === undefined) { throw "CX_SY_DYN_CALL_ILLEGAL_METHOD not found"; }\n`);
78619
78621
  ret.appendString(`if (${call} === undefined) { throw new ${lookupException}(); }\n`);
78622
+ */
78620
78623
  }
78621
78624
  else if (child.get() instanceof core_1.Expressions.MethodName
78622
78625
  || child.get() instanceof core_1.Expressions.AttributeName) {
@@ -81795,7 +81798,6 @@ static INTERNAL_TYPE = 'CLAS';
81795
81798
  static INTERNAL_NAME = '${traversal.buildInternalName(token.getStr(), def)}';
81796
81799
  static IMPLEMENTED_INTERFACES = [${this.findImplementedByClass(traversal, def, scope).map(e => `"` + e.toUpperCase() + `"`).join(",")}];
81797
81800
  static ATTRIBUTES = {${traversal.buildAttributes(def, scope).join(",\n")}};
81798
- static FRIENDS_ACCESS_STATIC = {}; // todo
81799
81801
  static METHODS = {${traversal.buildMethods(def, scope).join(",\n")}};`, node, traversal);
81800
81802
  }
81801
81803
  findImplementedInterface(traversal, def, scope) {
@@ -87001,7 +87003,6 @@ class ${className?.toLowerCase()} {
87001
87003
  static IMPLEMENTED_INTERFACES = [];
87002
87004
  static INTERNAL_NAME = 'ABSTRACT_CLASS_INTERNAL_NAME';
87003
87005
  static ATTRIBUTES = {};
87004
- static FRIENDS_ACCESS_STATIC = {};
87005
87006
  async constructor_() {
87006
87007
  this.me = new abap.types.ABAPObject();
87007
87008
  this.me.set(this);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/transpiler-cli",
3
- "version": "2.10.33",
3
+ "version": "2.10.35",
4
4
  "description": "Transpiler - Command Line Interface",
5
5
  "funding": "https://github.com/sponsors/larshp",
6
6
  "bin": {
@@ -28,9 +28,9 @@
28
28
  "license": "MIT",
29
29
  "devDependencies": {
30
30
  "@abaplint/core": "^2.113.108",
31
- "@abaplint/transpiler": "^2.10.33",
31
+ "@abaplint/transpiler": "^2.10.35",
32
32
  "@types/glob": "^8.1.0",
33
- "@types/node": "^22.13.13",
33
+ "@types/node": "^22.13.17",
34
34
  "@types/progress": "^2.0.7",
35
35
  "glob": "=7.2.0",
36
36
  "progress": "^2.0.3",