@abaplint/transpiler-cli 2.11.90 → 2.11.91

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 -26
  2. package/package.json +2 -2
package/build/bundle.js CHANGED
@@ -78429,10 +78429,18 @@ exports.AttributeChainTranspiler = AttributeChainTranspiler;
78429
78429
 
78430
78430
  Object.defineProperty(exports, "__esModule", ({ value: true }));
78431
78431
  exports.AttributeNameTranspiler = void 0;
78432
+ const abaplint = __webpack_require__(/*! @abaplint/core */ "./node_modules/@abaplint/core/build/src/index.js");
78432
78433
  const chunk_1 = __webpack_require__(/*! ../chunk */ "./node_modules/@abaplint/transpiler/build/src/chunk.js");
78433
78434
  class AttributeNameTranspiler {
78434
78435
  transpile(node, traversal) {
78435
- return new chunk_1.Chunk().append(node.concatTokens(), node, traversal);
78436
+ let concat = node.concatTokens().toLowerCase();
78437
+ // todo: this needs to also check the class name is correct
78438
+ const ref = traversal.findReadOrWriteReference(node.getFirstToken());
78439
+ if (ref instanceof abaplint.Types.ClassAttribute
78440
+ && ref.getVisibility() === abaplint.Visibility.Private) {
78441
+ concat = "#" + concat;
78442
+ }
78443
+ return new chunk_1.Chunk().append(concat, node, traversal);
78436
78444
  }
78437
78445
  }
78438
78446
  exports.AttributeNameTranspiler = AttributeNameTranspiler;
@@ -91821,15 +91829,6 @@ class Traversal {
91821
91829
  return obj.getName().toLowerCase();
91822
91830
  }
91823
91831
  }
91824
- /*
91825
- const file = this.reg.getFileByName(ref.getFilename());
91826
- if (file) {
91827
- const obj = this.reg.findObjectForFile(file);
91828
- if (obj?.getType() === "INTF") {
91829
- return obj.getName().toLowerCase();
91830
- }
91831
- }
91832
- */
91833
91832
  return undefined;
91834
91833
  }
91835
91834
  findReadOrWriteReference(token) {
@@ -91916,22 +91915,6 @@ class Traversal {
91916
91915
  // NOTE: currently all are needed in the unit test setup
91917
91916
  ret += `"${name.replace("~", "$")}": this.${methodName}.bind(this),\n`;
91918
91917
  }
91919
- /*
91920
- for (const attribute of def.getAttributes()?.getAll() || []) {
91921
- if (attribute.getMeta().includes(abaplint.IdentifierMeta.Static) === true) {
91922
- // hmm, is this correct?
91923
- continue;
91924
- }
91925
- let privateHash = "";
91926
- if (attribute.getVisibility() === abaplint.Visibility.Private) {
91927
- privateHash = "#";
91928
- } else {
91929
- continue;
91930
- }
91931
- const attributeName = privateHash + Traversal.escapeNamespace(attribute.getName().toLowerCase());
91932
- ret += `"${attribute.getName().toLowerCase()}": this.${attributeName},\n`;
91933
- }
91934
- */
91935
91918
  ret += "};\n";
91936
91919
  return ret;
91937
91920
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/transpiler-cli",
3
- "version": "2.11.90",
3
+ "version": "2.11.91",
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.200",
31
- "@abaplint/transpiler": "^2.11.90",
31
+ "@abaplint/transpiler": "^2.11.91",
32
32
  "@types/glob": "^8.1.0",
33
33
  "@types/node": "^24.3.1",
34
34
  "@types/progress": "^2.0.7",