@abaplint/core 2.93.39 → 2.93.40

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.
@@ -6,7 +6,7 @@ const Expressions = require("../expressions");
6
6
  class IncludeType {
7
7
  getMatcher() {
8
8
  const tas = (0, combi_1.seq)("AS", Expressions.Field);
9
- const renaming = (0, combi_1.seq)("RENAMING WITH SUFFIX", Expressions.Source);
9
+ const renaming = (0, combi_1.seq)("RENAMING WITH SUFFIX", Expressions.ComponentName);
10
10
  const ret = (0, combi_1.seq)("INCLUDE", (0, combi_1.alt)("TYPE", "STRUCTURE"), Expressions.TypeName, (0, combi_1.opt)(tas), (0, combi_1.opt)(renaming));
11
11
  return ret;
12
12
  }
@@ -7,7 +7,7 @@ const basic_types_1 = require("../basic_types");
7
7
  const _typed_identifier_1 = require("../../types/_typed_identifier");
8
8
  class IncludeType {
9
9
  runSyntax(node, scope, filename) {
10
- var _a;
10
+ var _a, _b;
11
11
  const components = [];
12
12
  const iname = node.findFirstExpression(Expressions.TypeName);
13
13
  if (iname === undefined) {
@@ -19,6 +19,21 @@ class IncludeType {
19
19
  if (as && ityp instanceof basic_1.StructureType) {
20
20
  ityp = new basic_1.StructureType(ityp.getComponents().concat([{ name: as, type: ityp }]));
21
21
  }
22
+ const suffix = (_b = node.findExpressionAfterToken("SUFFIX")) === null || _b === void 0 ? void 0 : _b.concatTokens();
23
+ if (suffix && ityp instanceof basic_1.StructureType) {
24
+ const components = [];
25
+ for (const c of ityp.getComponents()) {
26
+ if (c.name === as) {
27
+ components.push(c);
28
+ continue;
29
+ }
30
+ components.push({
31
+ name: c.name + suffix,
32
+ type: c.type,
33
+ });
34
+ }
35
+ ityp = new basic_1.StructureType(components);
36
+ }
22
37
  if (ityp
23
38
  && ityp instanceof _typed_identifier_1.TypedIdentifier
24
39
  && ityp.getType() instanceof basic_1.StructureType) {
@@ -63,7 +63,7 @@ class Registry {
63
63
  }
64
64
  static abaplintVersion() {
65
65
  // magic, see build script "version.sh"
66
- return "2.93.39";
66
+ return "2.93.40";
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.39",
3
+ "version": "2.93.40",
4
4
  "description": "abaplint - Core API",
5
5
  "main": "build/src/index.js",
6
6
  "typings": "build/abaplint.d.ts",
@@ -51,7 +51,7 @@
51
51
  "@types/mocha": "^10.0.0",
52
52
  "@types/node": "^18.8.3",
53
53
  "chai": "^4.3.6",
54
- "eslint": "^8.24.0",
54
+ "eslint": "^8.25.0",
55
55
  "mocha": "^10.0.0",
56
56
  "c8": "^7.12.0",
57
57
  "source-map-support": "^0.5.21",