@abaplint/transpiler-cli 2.5.27 → 2.5.28

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 +16 -15
  2. package/package.json +3 -3
package/build/bundle.js CHANGED
@@ -21639,6 +21639,7 @@ const structure_type_1 = __webpack_require__(/*! ../../types/basic/structure_typ
21639
21639
  const basic_1 = __webpack_require__(/*! ../../types/basic */ "./node_modules/@abaplint/core/build/src/abap/types/basic/index.js");
21640
21640
  const types_1 = __webpack_require__(/*! ../../types */ "./node_modules/@abaplint/core/build/src/abap/types/index.js");
21641
21641
  const _reference_1 = __webpack_require__(/*! ../_reference */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/_reference.js");
21642
+ const _object_oriented_1 = __webpack_require__(/*! ../_object_oriented */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/_object_oriented.js");
21642
21643
  class ComponentChain {
21643
21644
  runSyntax(context, node, scope, filename) {
21644
21645
  const children = node.getChildren();
@@ -21684,22 +21685,22 @@ class ComponentChain {
21684
21685
  }
21685
21686
  else if (context instanceof basic_1.ObjectReferenceType) {
21686
21687
  const id = context.getIdentifier();
21687
- if (id instanceof types_1.InterfaceDefinition || id instanceof types_1.ClassDefinition) {
21688
- const found = id.getAttributes().findByName(name);
21689
- context = found === null || found === void 0 ? void 0 : found.getType();
21690
- if (context === undefined) {
21691
- throw new Error("Attribute \"" + name + "\" not found");
21692
- }
21693
- else {
21694
- const extra = {
21695
- ooName: id.getName(),
21696
- ooType: id instanceof types_1.ClassDefinition ? "CLAS" : "INTF"
21697
- };
21698
- scope.addReference(child.getFirstToken(), found, _reference_1.ReferenceType.DataWriteReference, filename, extra);
21699
- }
21688
+ const def = scope.findObjectDefinition(id.getName());
21689
+ if (def === undefined) {
21690
+ throw new Error(id.getName() + " not found in scope");
21691
+ }
21692
+ const helper = new _object_oriented_1.ObjectOriented(scope);
21693
+ const found = helper.searchAttributeName(def, name);
21694
+ context = found === null || found === void 0 ? void 0 : found.getType();
21695
+ if (context === undefined) {
21696
+ throw new Error("Attribute \"" + name + "\" not found");
21700
21697
  }
21701
21698
  else {
21702
- throw new Error("ComponentChain, unexpected type2");
21699
+ const extra = {
21700
+ ooName: id.getName(),
21701
+ ooType: id instanceof types_1.ClassDefinition ? "CLAS" : "INTF"
21702
+ };
21703
+ scope.addReference(child.getFirstToken(), found, _reference_1.ReferenceType.DataWriteReference, filename, extra);
21703
21704
  }
21704
21705
  }
21705
21706
  else {
@@ -46209,7 +46210,7 @@ class Registry {
46209
46210
  }
46210
46211
  static abaplintVersion() {
46211
46212
  // magic, see build script "version.sh"
46212
- return "2.95.36";
46213
+ return "2.95.38";
46213
46214
  }
46214
46215
  getDDICReferences() {
46215
46216
  return this.references;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/transpiler-cli",
3
- "version": "2.5.27",
3
+ "version": "2.5.28",
4
4
  "description": "Transpiler - Command Line Interface",
5
5
  "bin": {
6
6
  "abap_transpile": "./abap_transpile"
@@ -25,11 +25,11 @@
25
25
  "author": "abaplint",
26
26
  "license": "MIT",
27
27
  "devDependencies": {
28
- "@abaplint/transpiler": "^2.5.27",
28
+ "@abaplint/transpiler": "^2.5.28",
29
29
  "@types/glob": "^7.2.0",
30
30
  "glob": "=7.2.0",
31
31
  "@types/progress": "^2.0.5",
32
- "@abaplint/core": "^2.95.36",
32
+ "@abaplint/core": "^2.95.38",
33
33
  "progress": "^2.0.3",
34
34
  "webpack": "^5.76.0",
35
35
  "webpack-cli": "^5.0.1",