@abaplint/core 2.113.212 → 2.113.214

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.
@@ -6839,7 +6839,7 @@ declare class StructureType extends AbstractType {
6839
6839
  private readonly indexed;
6840
6840
  private readonly components;
6841
6841
  constructor(components: IStructureComponent[], qualifiedName?: string, ddicName?: string, description?: string);
6842
- getComponents(): IStructureComponent[];
6842
+ getComponents(): readonly IStructureComponent[];
6843
6843
  getComponentByName(name: string): AbstractType | undefined;
6844
6844
  toText(level: number): string;
6845
6845
  isGeneric(): boolean;
@@ -579,7 +579,7 @@ class BasicTypes {
579
579
  throw new Error("parseType, componentName expected");
580
580
  }
581
581
  if (found instanceof Types.StructureType) {
582
- const newComponents = found.getComponents();
582
+ const newComponents = [...found.getComponents()];
583
583
  newComponents.push({ name: componentName, type: Types.VoidType.get("INDICATORStodo") });
584
584
  found = new Types.StructureType(newComponents, qualifiedName);
585
585
  }
@@ -183,12 +183,13 @@ class MethodParameters {
183
183
  const concat = node.concatTokens().toUpperCase();
184
184
  if (concat.includes(" FOR VALIDATE ")
185
185
  || concat.includes(" FOR BEHAVIOR ")
186
+ || concat.includes(" FOR DETERMINE ")
186
187
  || concat.includes(" FOR FEATURES ")
187
188
  || concat.includes(" FOR INSTANCE FEATURES ")
189
+ || concat.includes(" FOR LOCK ")
190
+ || concat.includes(" FOR NUMBERING ")
188
191
  || concat.includes(" FOR READ ")
189
192
  || concat.includes(" FOR VALIDATION ")
190
- || concat.includes(" FOR DETERMINE ")
191
- || concat.includes(" FOR LOCK ")
192
193
  || concat.includes(" FOR MODIFY ")) {
193
194
  const token = isRap.getFirstToken();
194
195
  this.exporting.push(new _typed_identifier_1.TypedIdentifier(new identifier_1.Identifier(token.getStart(), "failed"), input.filename, basic_1.VoidType.get("RapMethodParameter"), ["exporting" /* IdentifierMeta.MethodExporting */]));
@@ -37,7 +37,7 @@ class CDSDetermineTypes {
37
37
  }
38
38
  components.push({
39
39
  name: f.name,
40
- type: new basic_1.UnknownType("CDS parser error, unknown source, " + ddlsName),
40
+ type: new basic_1.UnknownType("CDS parser error, unknown source, " + f.name + ", " + ddlsName),
41
41
  });
42
42
  continue;
43
43
  }
@@ -5,7 +5,7 @@ const _1 = require(".");
5
5
  const combi_1 = require("../../abap/2_statements/combi");
6
6
  class CDSCase extends combi_1.Expression {
7
7
  getRunnable() {
8
- const name = (0, combi_1.seq)(_1.CDSName, (0, combi_1.optPrio)((0, combi_1.seq)(".", _1.CDSName)));
8
+ const name = (0, combi_1.seq)(_1.CDSName, (0, combi_1.starPrio)((0, combi_1.seq)(".", _1.CDSName)));
9
9
  const value = (0, combi_1.altPrio)(_1.CDSFunction, _1.CDSString, CDSCase, _1.CDSCast, _1.CDSArithmetics, name);
10
10
  const thenValue = (0, combi_1.altPrio)((0, combi_1.seq)("(", value, ")"), value);
11
11
  const simple = (0, combi_1.seq)((0, combi_1.altPrio)(_1.CDSFunction, name), (0, combi_1.plusPrio)((0, combi_1.seq)("WHEN", value, "THEN", thenValue)));
@@ -5,7 +5,7 @@ const _1 = require(".");
5
5
  const combi_1 = require("../../abap/2_statements/combi");
6
6
  class CDSCast extends combi_1.Expression {
7
7
  getRunnable() {
8
- const name = (0, combi_1.seq)(_1.CDSName, (0, combi_1.optPrio)((0, combi_1.seq)(".", _1.CDSName)));
8
+ const name = (0, combi_1.seq)(_1.CDSName, (0, combi_1.starPrio)((0, combi_1.seq)(".", _1.CDSName)));
9
9
  return (0, combi_1.seq)("CAST", "(", (0, combi_1.altPrio)(_1.CDSFunction, _1.CDSCase, _1.CDSAggregate, _1.CDSArithmetics, CDSCast, _1.CDSString, name), "AS", _1.CDSType, (0, combi_1.optPrio)((0, combi_1.seq)("PRESERVING", "TYPE")), ")");
10
10
  }
11
11
  }
@@ -6,7 +6,7 @@ const combi_1 = require("../../abap/2_statements/combi");
6
6
  const cds_integer_1 = require("./cds_integer");
7
7
  class CDSCondition extends combi_1.Expression {
8
8
  getRunnable() {
9
- const name = (0, combi_1.seq)(_1.CDSName, (0, combi_1.optPrio)((0, combi_1.seq)(".", (0, combi_1.altPrio)(_1.CDSString, _1.CDSName))));
9
+ const name = (0, combi_1.seq)(_1.CDSName, (0, combi_1.starPrio)((0, combi_1.seq)(".", (0, combi_1.altPrio)(_1.CDSString, _1.CDSName))));
10
10
  const left = (0, combi_1.altPrio)(_1.CDSString, _1.CDSFunction, _1.CDSAggregate, name);
11
11
  const operators = (0, combi_1.altPrio)("=", (0, combi_1.seq)("!", "="), (0, combi_1.seq)("<", ">"), (0, combi_1.seq)(">", "="), (0, combi_1.seq)("<", "="), "<", ">", "LIKE", "NOT LIKE");
12
12
  const compare = (0, combi_1.seq)(operators, (0, combi_1.altPrio)(left, cds_integer_1.CDSInteger));
@@ -8,8 +8,8 @@ const cds_cast_1 = require("./cds_cast");
8
8
  class CDSElement extends combi_1.Expression {
9
9
  getRunnable() {
10
10
  const redirected = (0, combi_1.seq)(": REDIRECTED TO", (0, combi_1.opt)((0, combi_1.alt)("PARENT", "COMPOSITION CHILD")), _1.CDSName);
11
- const colonThing = (0, combi_1.seq)(":", _1.CDSName);
12
- return (0, combi_1.seq)((0, combi_1.starPrio)(_1.CDSAnnotation), (0, combi_1.optPrio)("KEY"), (0, combi_1.altPrio)(_1.CDSAggregate, _1.CDSString, _1.CDSArithmetics, _1.CDSFunction, cds_cast_1.CDSCast, _1.CDSCase, (0, combi_1.seq)("(", _1.CDSCase, ")"), (0, combi_1.seq)(_1.CDSPrefixedName, (0, combi_1.opt)((0, combi_1.alt)(redirected, colonThing))), _1.CDSInteger), (0, combi_1.opt)(cds_as_1.CDSAs));
11
+ const colonThing = (0, combi_1.seq)(":", (0, combi_1.alt)(_1.CDSName, _1.CDSType));
12
+ return (0, combi_1.seq)((0, combi_1.starPrio)(_1.CDSAnnotation), (0, combi_1.optPrio)((0, combi_1.altPrio)("KEY", "VIRTUAL")), (0, combi_1.altPrio)(_1.CDSAggregate, _1.CDSString, _1.CDSArithmetics, _1.CDSFunction, cds_cast_1.CDSCast, _1.CDSCase, (0, combi_1.seq)("(", _1.CDSCase, ")"), (0, combi_1.seq)(_1.CDSPrefixedName, (0, combi_1.opt)((0, combi_1.alt)(redirected, colonThing))), _1.CDSInteger), (0, combi_1.opt)(cds_as_1.CDSAs));
13
13
  }
14
14
  }
15
15
  exports.CDSElement = CDSElement;
@@ -8,7 +8,7 @@ class CDSJoin extends combi_1.Expression {
8
8
  getRunnable() {
9
9
  const cond = (0, combi_1.seq)(_1.CDSSource, "ON", cds_condition_1.CDSCondition);
10
10
  const foo = (0, combi_1.altPrio)((0, combi_1.seq)("(", cond, ")"), cond);
11
- return (0, combi_1.seq)((0, combi_1.optPrio)((0, combi_1.altPrio)("LEFT OUTER TO ONE", "LEFT OUTER", "INNER")), "JOIN", foo);
11
+ return (0, combi_1.seq)((0, combi_1.optPrio)((0, combi_1.altPrio)("LEFT OUTER TO ONE", "LEFT OUTER", "INNER", "CROSS")), "JOIN", foo);
12
12
  }
13
13
  }
14
14
  exports.CDSJoin = CDSJoin;
@@ -128,7 +128,7 @@ class DataDefinition extends _abstract_object_1.AbstractObject {
128
128
  return undefined;
129
129
  }
130
130
  findFieldNames(tree) {
131
- var _a, _b;
131
+ var _a, _b, _c;
132
132
  let expr = tree.findFirstExpression(expressions_1.CDSSelect);
133
133
  if (expr === undefined) {
134
134
  expr = tree.findFirstExpression(expressions_1.CDSAnnotate);
@@ -140,14 +140,16 @@ class DataDefinition extends _abstract_object_1.AbstractObject {
140
140
  let prefix = "";
141
141
  let found = (_a = e.findDirectExpression(expressions_1.CDSAs)) === null || _a === void 0 ? void 0 : _a.findDirectExpression(expressions_1.CDSName);
142
142
  if (found === undefined) {
143
- const list = e.findAllExpressions(expressions_1.CDSName);
144
- if (e.concatTokens().toUpperCase().includes(" REDIRECTED TO ")) {
145
- found = list[0];
146
- }
147
- else {
148
- found = list[list.length - 1];
149
- if (list.length > 1) {
150
- prefix = list[0].concatTokens();
143
+ const list = (_b = e.findDirectExpression(expressions_1.CDSPrefixedName)) === null || _b === void 0 ? void 0 : _b.findAllExpressions(expressions_1.CDSName);
144
+ if (list) {
145
+ if (e.concatTokens().toUpperCase().includes(" REDIRECTED TO ")) {
146
+ found = list[0];
147
+ }
148
+ else {
149
+ found = list[list.length - 1];
150
+ if (list.length > 1) {
151
+ prefix = list[0].concatTokens();
152
+ }
151
153
  }
152
154
  }
153
155
  }
@@ -155,7 +157,7 @@ class DataDefinition extends _abstract_object_1.AbstractObject {
155
157
  continue;
156
158
  }
157
159
  const name = found === null || found === void 0 ? void 0 : found.concatTokens();
158
- if ((_b = this.parsedData) === null || _b === void 0 ? void 0 : _b.associations.some(a => { var _a; return a.name.toUpperCase() === name.toUpperCase() || ((_a = a.as) === null || _a === void 0 ? void 0 : _a.toUpperCase()) === name.toUpperCase(); })) {
160
+ if ((_c = this.parsedData) === null || _c === void 0 ? void 0 : _c.associations.some(a => { var _a; return a.name.toUpperCase() === name.toUpperCase() || ((_a = a.as) === null || _a === void 0 ? void 0 : _a.toUpperCase()) === name.toUpperCase(); })) {
159
161
  continue;
160
162
  }
161
163
  const annotations = [];
@@ -67,7 +67,7 @@ class Registry {
67
67
  }
68
68
  static abaplintVersion() {
69
69
  // magic, see build script "version.sh"
70
- return "2.113.212";
70
+ return "2.113.214";
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.212",
3
+ "version": "2.113.214",
4
4
  "description": "abaplint - Core API",
5
5
  "main": "build/src/index.js",
6
6
  "typings": "build/abaplint.d.ts",