@abaplint/core 2.113.210 → 2.113.212

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.
@@ -3,13 +3,14 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.Type = void 0;
4
4
  const combi_1 = require("../combi");
5
5
  const _1 = require(".");
6
+ const version_1 = require("../../../version");
6
7
  class Type extends combi_1.Expression {
7
8
  getRunnable() {
8
- const indicators = (0, combi_1.seq)("WITH INDICATORS", _1.ComponentName, "TYPE", _1.TypeName);
9
+ const indicators = (0, combi_1.seq)("WITH INDICATORS", _1.ComponentName, (0, combi_1.optPrio)((0, combi_1.seq)("TYPE", _1.TypeName)));
9
10
  const typeType = (0, combi_1.seq)(_1.TypeName, (0, combi_1.optPrio)(_1.Default));
10
11
  const like = (0, combi_1.altPrio)((0, combi_1.seq)("LINE OF", _1.FieldChain), (0, combi_1.seq)("REF TO", _1.FieldChain), _1.FieldChain);
11
12
  const type = (0, combi_1.altPrio)((0, combi_1.seq)("LINE OF", typeType), (0, combi_1.seq)("REF TO", typeType), (0, combi_1.seq)(typeType, (0, combi_1.optPrio)(_1.LOBHandle)));
12
- const ret = (0, combi_1.seq)((0, combi_1.altPrio)((0, combi_1.seq)("LIKE", like), (0, combi_1.seq)("TYPE", type)), (0, combi_1.optPrio)(indicators));
13
+ const ret = (0, combi_1.seq)((0, combi_1.altPrio)((0, combi_1.seq)("LIKE", like), (0, combi_1.seq)("TYPE", type)), (0, combi_1.optPrio)((0, combi_1.ver)(version_1.Version.v755, indicators)));
13
14
  return ret;
14
15
  }
15
16
  }
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.CreateObject = void 0;
4
4
  const combi_1 = require("../combi");
5
5
  const expressions_1 = require("../expressions");
6
+ const version_1 = require("../../../version");
6
7
  class CreateObject {
7
8
  getMatcher() {
8
9
  const exporting = (0, combi_1.seq)("EXPORTING", expressions_1.ParameterListS);
@@ -11,7 +12,7 @@ class CreateObject {
11
12
  const etable = (0, combi_1.seq)("EXCEPTION-TABLE", expressions_1.Source);
12
13
  const area = (0, combi_1.seq)("AREA HANDLE", expressions_1.Source);
13
14
  const type = (0, combi_1.seq)("TYPE", (0, combi_1.altPrio)(expressions_1.ClassName, expressions_1.Dynamic));
14
- const ret = (0, combi_1.seq)("CREATE OBJECT", expressions_1.Target, (0, combi_1.optPrio)((0, combi_1.per)(type, area)), (0, combi_1.optPrio)((0, combi_1.altPrio)(exporting, ptable)), (0, combi_1.optPrio)((0, combi_1.altPrio)(exceptions, etable)));
15
+ const ret = (0, combi_1.seq)("CREATE OBJECT", expressions_1.Target, (0, combi_1.optPrio)((0, combi_1.per)(type, (0, combi_1.verNot)(version_1.Version.Cloud, area))), (0, combi_1.optPrio)((0, combi_1.altPrio)(exporting, ptable)), (0, combi_1.optPrio)((0, combi_1.altPrio)(exceptions, etable)));
15
16
  return ret;
16
17
  }
17
18
  }
@@ -3,12 +3,13 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.UpdateDatabase = void 0;
4
4
  const combi_1 = require("../combi");
5
5
  const expressions_1 = require("../expressions");
6
+ const version_1 = require("../../../version");
6
7
  class UpdateDatabase {
7
8
  getMatcher() {
8
9
  const parameters = (0, combi_1.seq)(expressions_1.SQLFieldAndValue, (0, combi_1.star)((0, combi_1.seq)((0, combi_1.opt)(","), expressions_1.SQLFieldAndValue)));
9
10
  const set = (0, combi_1.seq)("SET", (0, combi_1.alt)(parameters, expressions_1.Dynamic), (0, combi_1.opt)((0, combi_1.seq)("WHERE", expressions_1.SQLCond)));
10
11
  const indicators = (0, combi_1.seq)("INDICATORS SET STRUCTURE", expressions_1.ComponentName);
11
- const fromTable = (0, combi_1.seq)("FROM", (0, combi_1.opt)("TABLE"), expressions_1.SQLSource, (0, combi_1.opt)(indicators));
12
+ const fromTable = (0, combi_1.seq)("FROM", (0, combi_1.opt)("TABLE"), expressions_1.SQLSource, (0, combi_1.opt)((0, combi_1.ver)(version_1.Version.v755, indicators)));
12
13
  const ret = (0, combi_1.seq)("UPDATE", expressions_1.DatabaseTable, (0, combi_1.opt)(expressions_1.SQLClient), (0, combi_1.opt)(expressions_1.DatabaseConnection), (0, combi_1.opt)((0, combi_1.alt)(fromTable, set)));
13
14
  return ret;
14
15
  }
@@ -207,6 +207,15 @@ class ObjectOriented {
207
207
  if (search) {
208
208
  return search;
209
209
  }
210
+ for (const a of def.getAliases()) {
211
+ if (a.getName().toUpperCase() === name.toUpperCase()) {
212
+ const comp = a.getComponent();
213
+ const res = this.searchTypeName(this.scope.findObjectDefinition(comp.split("~")[0]), comp.split("~")[1]);
214
+ if (res) {
215
+ return res;
216
+ }
217
+ }
218
+ }
210
219
  if (name.includes("~")) {
211
220
  const interfaceName = name.split("~")[0];
212
221
  if (def.getImplementing().some((a) => a.name.toUpperCase() === interfaceName.toUpperCase())) {
@@ -435,7 +435,7 @@ class BasicTypes {
435
435
  return this.parseType(node, name);
436
436
  }
437
437
  parseType(node, qualifiedName) {
438
- var _a, _b, _c, _d, _e, _f;
438
+ var _a, _b, _c, _d, _e, _f, _g, _h;
439
439
  const typeName = node.findFirstExpression(Expressions.TypeName);
440
440
  let text = (_a = node.findFirstExpression(Expressions.Type)) === null || _a === void 0 ? void 0 : _a.concatTokens().toUpperCase();
441
441
  if (text === undefined) {
@@ -573,6 +573,17 @@ class BasicTypes {
573
573
  }
574
574
  }
575
575
  }
576
+ if (text.includes(" WITH INDICATORS ")) {
577
+ const componentName = (_h = (_g = node.findFirstExpression(Expressions.Type)) === null || _g === void 0 ? void 0 : _g.findDirectExpression(Expressions.ComponentName)) === null || _h === void 0 ? void 0 : _h.concatTokens().toUpperCase();
578
+ if (componentName === undefined) {
579
+ throw new Error("parseType, componentName expected");
580
+ }
581
+ if (found instanceof Types.StructureType) {
582
+ const newComponents = found.getComponents();
583
+ newComponents.push({ name: componentName, type: Types.VoidType.get("INDICATORStodo") });
584
+ found = new Types.StructureType(newComponents, qualifiedName);
585
+ }
586
+ }
576
587
  return found;
577
588
  }
578
589
  /////////////////////
@@ -20,7 +20,7 @@ class Append {
20
20
  const fsTarget = node.findExpressionAfterToken("ASSIGNING");
21
21
  if (fsTarget && fsTarget.get() instanceof Expressions.FSTarget) {
22
22
  if (!(targetType instanceof basic_1.TableType) && !(targetType instanceof basic_1.VoidType)) {
23
- const message = "APPEND to non table type";
23
+ const message = "APPEND to non table type, " + (targetType === null || targetType === void 0 ? void 0 : targetType.constructor.name);
24
24
  input.issues.push((0, _syntax_input_1.syntaxIssue)(input, node.getFirstToken(), message));
25
25
  return;
26
26
  }
@@ -30,7 +30,7 @@ class Append {
30
30
  const dataTarget = node.findExpressionAfterToken("INTO");
31
31
  if (dataTarget && node.concatTokens().toUpperCase().includes(" REFERENCE INTO DATA(")) {
32
32
  if (!(targetType instanceof basic_1.TableType) && !(targetType instanceof basic_1.VoidType)) {
33
- const message = "APPEND to non table type";
33
+ const message = "APPEND to non table type, " + (targetType === null || targetType === void 0 ? void 0 : targetType.constructor.name);
34
34
  input.issues.push((0, _syntax_input_1.syntaxIssue)(input, node.getFirstToken(), message));
35
35
  return;
36
36
  }
@@ -67,7 +67,7 @@ class Registry {
67
67
  }
68
68
  static abaplintVersion() {
69
69
  // magic, see build script "version.sh"
70
- return "2.113.210";
70
+ return "2.113.212";
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.113.210",
3
+ "version": "2.113.212",
4
4
  "description": "abaplint - Core API",
5
5
  "main": "build/src/index.js",
6
6
  "typings": "build/abaplint.d.ts",
@@ -53,9 +53,9 @@
53
53
  "@microsoft/api-extractor": "^7.52.13",
54
54
  "@types/chai": "^4.3.20",
55
55
  "@types/mocha": "^10.0.10",
56
- "@types/node": "^24.4.0",
56
+ "@types/node": "^24.5.2",
57
57
  "chai": "^4.5.0",
58
- "eslint": "^9.35.0",
58
+ "eslint": "^9.36.0",
59
59
  "mocha": "^11.7.2",
60
60
  "c8": "^10.1.3",
61
61
  "source-map-support": "^0.5.21",