@abaplint/core 2.93.65 → 2.93.67

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.
@@ -68,7 +68,7 @@ class Procedural {
68
68
  return undefined;
69
69
  }
70
70
  findFunctionScope(obj, node, filename) {
71
- var _a, _b;
71
+ var _a, _b, _c, _d;
72
72
  if (!(obj instanceof objects_1.FunctionGroup)) {
73
73
  throw new Error("findFunctionScope, expected function group input");
74
74
  }
@@ -105,8 +105,17 @@ class Procedural {
105
105
  found = c;
106
106
  }
107
107
  }
108
+ if (found === undefined || found instanceof basic_1.UnknownType || found instanceof basic_1.VoidType) {
109
+ const f = (_b = this.scope.findType(name)) === null || _b === void 0 ? void 0 : _b.getType();
110
+ if (f && f instanceof basic_1.StructureType) {
111
+ const c = f.getComponentByName(field);
112
+ if (c) {
113
+ found = c;
114
+ }
115
+ }
116
+ }
108
117
  }
109
- else if ((found instanceof basic_1.UnknownType || found instanceof basic_1.VoidType) && ((_b = param.type) === null || _b === void 0 ? void 0 : _b.includes("=>"))) {
118
+ else if ((found instanceof basic_1.UnknownType || found instanceof basic_1.VoidType) && ((_c = param.type) === null || _c === void 0 ? void 0 : _c.includes("=>"))) {
110
119
  const [name, field] = param.type.split("=>");
111
120
  const def = this.scope.findObjectDefinition(name);
112
121
  const c = new _object_oriented_1.ObjectOriented(this.scope).searchTypeName(def, field);
@@ -119,6 +128,12 @@ class Procedural {
119
128
  if (f) {
120
129
  found = f;
121
130
  }
131
+ if (found === undefined || found instanceof basic_1.UnknownType || found instanceof basic_1.VoidType) {
132
+ const f = (_d = this.scope.findType(param.type)) === null || _d === void 0 ? void 0 : _d.getType();
133
+ if (f) {
134
+ found = f;
135
+ }
136
+ }
122
137
  }
123
138
  if (found instanceof basic_1.UnknownType && new ddic_1.DDIC(this.reg).inErrorNamespace(param.type) === false) {
124
139
  found = new basic_1.VoidType(param.type);
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.DataDefinition = void 0;
4
+ const nodes_1 = require("../abap/nodes");
4
5
  const cds_determine_types_1 = require("../cds/cds_determine_types");
5
6
  const cds_parser_1 = require("../cds/cds_parser");
6
7
  const expressions_1 = require("../cds/expressions");
@@ -75,7 +76,15 @@ class DataDefinition extends _abstract_object_1.AbstractObject {
75
76
  this.findSQLViewName();
76
77
  this.parsedData.tree = new cds_parser_1.CDSParser().parse(this.findSourceFile());
77
78
  if (this.parsedData.tree) {
78
- this.parsedData.definitionName = (_b = (_a = this.parsedData.tree) === null || _a === void 0 ? void 0 : _a.findFirstExpression(expressions_1.CDSName)) === null || _b === void 0 ? void 0 : _b.getFirstToken().getStr();
79
+ for (const c of ((_a = this.parsedData.tree) === null || _a === void 0 ? void 0 : _a.getChildren()) || []) {
80
+ if (c.get() instanceof expressions_1.CDSAnnotation) {
81
+ continue;
82
+ }
83
+ if (c instanceof nodes_1.ExpressionNode) {
84
+ this.parsedData.definitionName = (_b = c.findFirstExpression(expressions_1.CDSName)) === null || _b === void 0 ? void 0 : _b.getFirstToken().getStr();
85
+ break;
86
+ }
87
+ }
79
88
  this.findSourcesAndRelations(this.parsedData.tree);
80
89
  this.findFieldNames(this.parsedData.tree);
81
90
  }
@@ -63,7 +63,7 @@ class Registry {
63
63
  }
64
64
  static abaplintVersion() {
65
65
  // magic, see build script "version.sh"
66
- return "2.93.65";
66
+ return "2.93.67";
67
67
  }
68
68
  getDDICReferences() {
69
69
  return this.references;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/core",
3
- "version": "2.93.65",
3
+ "version": "2.93.67",
4
4
  "description": "abaplint - Core API",
5
5
  "main": "build/src/index.js",
6
6
  "typings": "build/abaplint.d.ts",