@abaplint/core 2.112.12 → 2.112.14

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.
@@ -113,7 +113,7 @@ class CurrentScope {
113
113
  }
114
114
  const upper = name.toUpperCase();
115
115
  if (this.current.getData().vars[upper] !== undefined) {
116
- // console.dir(new Error().stack);
116
+ // console.dir(new Error().stack);
117
117
  throw new Error(`Variable name "${name}" already defined`);
118
118
  }
119
119
  else if (this.isOO() && this.current.getData().types[upper] !== undefined) {
@@ -131,6 +131,7 @@ class CurrentScope {
131
131
  }
132
132
  const upper = name.toUpperCase();
133
133
  if (parent.getData().vars[upper] !== undefined) {
134
+ // console.dir(new Error().stack);
134
135
  throw new Error(`Variable name "${name}" already defined`);
135
136
  }
136
137
  else if (this.isOO() && parent.getData().types[upper] !== undefined) {
@@ -153,7 +153,7 @@ class ObjectOriented {
153
153
  }
154
154
  if (name.includes("~")) {
155
155
  const interfaceName = upper.split("~")[0];
156
- if (def.getImplementing().some((a) => a.name.toUpperCase() === interfaceName)) {
156
+ if (this.listInterfacesRecursive(def).includes(interfaceName)) {
157
157
  return this.searchAttributeName(this.scope.findInterfaceDefinition(interfaceName), name.split("~")[1]);
158
158
  }
159
159
  }
@@ -315,7 +315,19 @@ class ObjectOriented {
315
315
  }
316
316
  return ignore;
317
317
  }
318
- // returns list of interfaces implemented
318
+ /** returns list of interfaces implemented, recursive */
319
+ listInterfacesRecursive(definition) {
320
+ const list = [];
321
+ for (const i of definition.getImplementing()) {
322
+ const upper = i.name.toUpperCase();
323
+ list.push(upper);
324
+ const def = this.scope.findInterfaceDefinition(upper);
325
+ if (def) {
326
+ list.push(...this.listInterfacesRecursive(def));
327
+ }
328
+ }
329
+ return [...new Set(list)];
330
+ }
319
331
  fromInterfaces(definition, skip) {
320
332
  const ignore = [];
321
333
  for (const i of definition.getImplementing()) {
@@ -30,8 +30,11 @@ class Table extends _abstract_object_1.AbstractObject {
30
30
  return "TABL";
31
31
  }
32
32
  getDescription() {
33
- // todo
34
- return undefined;
33
+ var _a;
34
+ if (this.parsedData === undefined) {
35
+ this.parseXML();
36
+ }
37
+ return (_a = this.parsedData) === null || _a === void 0 ? void 0 : _a.description;
35
38
  }
36
39
  getAllowedNaming() {
37
40
  let length = 30;
@@ -259,7 +262,7 @@ class Table extends _abstract_object_1.AbstractObject {
259
262
  }
260
263
  ///////////////
261
264
  parseXML() {
262
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
265
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
263
266
  const parsed = super.parseRaw2();
264
267
  if (parsed === undefined) {
265
268
  return;
@@ -277,9 +280,10 @@ class Table extends _abstract_object_1.AbstractObject {
277
280
  }
278
281
  // table category
279
282
  this.parsedData.tableCategory = (_f = (_e = parsed.abapGit["asx:abap"]["asx:values"]) === null || _e === void 0 ? void 0 : _e.DD02V) === null || _f === void 0 ? void 0 : _f.TABCLASS;
280
- this.parsedData.dataClass = (_h = (_g = parsed.abapGit["asx:abap"]["asx:values"]) === null || _g === void 0 ? void 0 : _g.DD09L) === null || _h === void 0 ? void 0 : _h.TABART;
283
+ this.parsedData.description = (_h = (_g = parsed.abapGit["asx:abap"]["asx:values"]) === null || _g === void 0 ? void 0 : _g.DD02V) === null || _h === void 0 ? void 0 : _h.DDTEXT;
284
+ this.parsedData.dataClass = (_k = (_j = parsed.abapGit["asx:abap"]["asx:values"]) === null || _j === void 0 ? void 0 : _j.DD09L) === null || _k === void 0 ? void 0 : _k.TABART;
281
285
  // fields
282
- const fields = (_j = parsed.abapGit["asx:abap"]["asx:values"]) === null || _j === void 0 ? void 0 : _j.DD03P_TABLE;
286
+ const fields = (_l = parsed.abapGit["asx:abap"]["asx:values"]) === null || _l === void 0 ? void 0 : _l.DD03P_TABLE;
283
287
  for (const field of (0, xml_utils_1.xmlToArray)(fields === null || fields === void 0 ? void 0 : fields.DD03P)) {
284
288
  this.parsedData.fields.push({
285
289
  FIELDNAME: field.FIELDNAME,
@@ -67,7 +67,7 @@ class Registry {
67
67
  }
68
68
  static abaplintVersion() {
69
69
  // magic, see build script "version.sh"
70
- return "2.112.12";
70
+ return "2.112.14";
71
71
  }
72
72
  getDDICReferences() {
73
73
  return this.ddicReferences;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/core",
3
- "version": "2.112.12",
3
+ "version": "2.112.14",
4
4
  "description": "abaplint - Core API",
5
5
  "main": "build/src/index.js",
6
6
  "typings": "build/abaplint.d.ts",
@@ -53,10 +53,10 @@
53
53
  "@microsoft/api-extractor": "^7.47.5",
54
54
  "@types/chai": "^4.3.17",
55
55
  "@types/mocha": "^10.0.7",
56
- "@types/node": "^22.1.0",
56
+ "@types/node": "^22.2.0",
57
57
  "chai": "^4.5.0",
58
58
  "eslint": "^8.57.0",
59
- "mocha": "^10.7.0",
59
+ "mocha": "^10.7.3",
60
60
  "c8": "^10.1.2",
61
61
  "source-map-support": "^0.5.21",
62
62
  "ts-json-schema-generator": "^2.3.0",