@abaplint/core 2.113.64 → 2.113.66

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.
@@ -6116,7 +6116,7 @@ export declare class StatementFlow {
6116
6116
  private runEvent;
6117
6117
  private run;
6118
6118
  private findBody;
6119
- private buildName;
6119
+ static buildName(statement: StatementNode): string;
6120
6120
  private traverseBody;
6121
6121
  private traverseStructure;
6122
6122
  }
@@ -11,7 +11,8 @@ class TypeTableKey extends combi_1.Expression {
11
11
  const emptyKey = (0, combi_1.ver)(version_1.Version.v740sp02, "EMPTY KEY");
12
12
  const components = (0, combi_1.plus)((0, combi_1.alt)((0, combi_1.seq)("WITH", (0, combi_1.failStar)()), _1.FieldSub));
13
13
  const further = (0, combi_1.seq)((0, combi_1.alt)("WITHOUT", "WITH"), "FURTHER SECONDARY KEYS");
14
- const key = (0, combi_1.seq)("WITH", (0, combi_1.opt)(uniqueness), (0, combi_1.altPrio)(defaultKey, emptyKey, (0, combi_1.seq)((0, combi_1.opt)((0, combi_1.alt)("SORTED", "HASHED")), "KEY", (0, combi_1.alt)((0, combi_1.seq)(_1.Field, "COMPONENTS", components), components))), (0, combi_1.optPrio)(further), (0, combi_1.optPrio)("READ-ONLY"));
14
+ const alias = (0, combi_1.seq)("ALIAS", _1.Field);
15
+ const key = (0, combi_1.seq)("WITH", (0, combi_1.opt)(uniqueness), (0, combi_1.altPrio)(defaultKey, emptyKey, (0, combi_1.seq)((0, combi_1.opt)((0, combi_1.alt)("SORTED", "HASHED")), "KEY", (0, combi_1.alt)((0, combi_1.seq)(_1.Field, (0, combi_1.opt)(alias), "COMPONENTS", components), components))), (0, combi_1.optPrio)(further), (0, combi_1.optPrio)("READ-ONLY"));
15
16
  return key;
16
17
  }
17
18
  }
@@ -98,7 +98,7 @@ class StatementFlow {
98
98
  return ((_a = f.findDirectStructure(Structures.Body)) === null || _a === void 0 ? void 0 : _a.getChildren()) || [];
99
99
  }
100
100
  // note: it must handle macros and chained statements
101
- buildName(statement) {
101
+ static buildName(statement) {
102
102
  let token = undefined;
103
103
  const colon = statement.getColon();
104
104
  if (colon === undefined) {
@@ -136,7 +136,7 @@ class StatementFlow {
136
136
  if (c.get() instanceof Structures.Normal) {
137
137
  const firstChild = c.getFirstChild(); // "Normal" only has one child
138
138
  if (firstChild instanceof nodes_1.StatementNode) {
139
- const name = this.buildName(firstChild);
139
+ const name = StatementFlow.buildName(firstChild);
140
140
  graph.addEdge(current, name, flow_graph_1.FLOW_EDGE_TYPE.undefined);
141
141
  current = name;
142
142
  if (firstChild.get() instanceof Statements.Check) {
@@ -185,7 +185,7 @@ class StatementFlow {
185
185
  let current = graph.getStart();
186
186
  const type = n.get();
187
187
  if (type instanceof Structures.If) {
188
- const ifName = this.buildName(n.findDirectStatement(Statements.If));
188
+ const ifName = StatementFlow.buildName(n.findDirectStatement(Statements.If));
189
189
  const sub = this.traverseBody(this.findBody(n), context);
190
190
  graph.addEdge(current, ifName, flow_graph_1.FLOW_EDGE_TYPE.undefined);
191
191
  graph.addGraph(ifName, sub, flow_graph_1.FLOW_EDGE_TYPE.true);
@@ -196,7 +196,7 @@ class StatementFlow {
196
196
  if (elseifst === undefined) {
197
197
  continue;
198
198
  }
199
- const elseIfName = this.buildName(elseifst);
199
+ const elseIfName = StatementFlow.buildName(elseifst);
200
200
  const sub = this.traverseBody(this.findBody(e), context);
201
201
  graph.addEdge(current, elseIfName, flow_graph_1.FLOW_EDGE_TYPE.false);
202
202
  graph.addGraph(elseIfName, sub, flow_graph_1.FLOW_EDGE_TYPE.true);
@@ -206,7 +206,7 @@ class StatementFlow {
206
206
  const els = n.findDirectStructure(Structures.Else);
207
207
  const elsest = els === null || els === void 0 ? void 0 : els.findDirectStatement(Statements.Else);
208
208
  if (els && elsest) {
209
- const elseName = this.buildName(elsest);
209
+ const elseName = StatementFlow.buildName(elsest);
210
210
  const sub = this.traverseBody(this.findBody(els), context);
211
211
  graph.addEdge(current, elseName, flow_graph_1.FLOW_EDGE_TYPE.false);
212
212
  graph.addGraph(elseName, sub, flow_graph_1.FLOW_EDGE_TYPE.undefined);
@@ -223,7 +223,7 @@ class StatementFlow {
223
223
  || type instanceof Structures.Select
224
224
  || type instanceof Structures.LoopAtScreen
225
225
  || type instanceof Structures.Do) {
226
- const loopName = this.buildName(n.getFirstStatement());
226
+ const loopName = StatementFlow.buildName(n.getFirstStatement());
227
227
  const sub = this.traverseBody(this.findBody(n), Object.assign(Object.assign({}, context), { loopStart: loopName, loopEnd: graph.getEnd() }));
228
228
  graph.addEdge(current, loopName, flow_graph_1.FLOW_EDGE_TYPE.undefined);
229
229
  graph.addGraph(loopName, sub, flow_graph_1.FLOW_EDGE_TYPE.true);
@@ -233,10 +233,11 @@ class StatementFlow {
233
233
  else if (type instanceof Structures.Data
234
234
  || type instanceof Structures.Constants
235
235
  || type instanceof Structures.Statics
236
+ || type instanceof Structures.ExecSQL
236
237
  || type instanceof Structures.Types) {
237
238
  // these doesnt affect control flow, so just take the first statement
238
239
  const statement = n.getFirstStatement();
239
- const name = this.buildName(statement);
240
+ const name = StatementFlow.buildName(statement);
240
241
  graph.addEdge(current, name, flow_graph_1.FLOW_EDGE_TYPE.undefined);
241
242
  graph.addEdge(name, graph.getEnd(), flow_graph_1.FLOW_EDGE_TYPE.undefined);
242
243
  }
@@ -244,7 +245,7 @@ class StatementFlow {
244
245
  || type instanceof Structures.AtLast
245
246
  || type instanceof Structures.At
246
247
  || type instanceof Structures.OnChange) {
247
- const name = this.buildName(n.getFirstStatement());
248
+ const name = StatementFlow.buildName(n.getFirstStatement());
248
249
  const body = this.traverseBody(this.findBody(n), context);
249
250
  graph.addEdge(current, name, flow_graph_1.FLOW_EDGE_TYPE.undefined);
250
251
  graph.addGraph(name, body, flow_graph_1.FLOW_EDGE_TYPE.undefined);
@@ -252,13 +253,13 @@ class StatementFlow {
252
253
  graph.addEdge(current, graph.getEnd(), flow_graph_1.FLOW_EDGE_TYPE.undefined);
253
254
  }
254
255
  else if (type instanceof Structures.Try) {
255
- const tryName = this.buildName(n.getFirstStatement());
256
+ const tryName = StatementFlow.buildName(n.getFirstStatement());
256
257
  const body = this.traverseBody(this.findBody(n), context);
257
258
  graph.addEdge(current, tryName, flow_graph_1.FLOW_EDGE_TYPE.undefined);
258
259
  graph.addGraph(tryName, body, flow_graph_1.FLOW_EDGE_TYPE.undefined);
259
260
  graph.addEdge(body.getEnd(), graph.getEnd(), flow_graph_1.FLOW_EDGE_TYPE.undefined);
260
261
  for (const c of n.findDirectStructures(Structures.Catch)) {
261
- const catchName = this.buildName(c.getFirstStatement());
262
+ const catchName = StatementFlow.buildName(c.getFirstStatement());
262
263
  const catchBody = this.traverseBody(this.findBody(c), context);
263
264
  // TODO: this does not take exceptions into account
264
265
  graph.addEdge(body.getEnd(), catchName, flow_graph_1.FLOW_EDGE_TYPE.undefined);
@@ -269,14 +270,14 @@ class StatementFlow {
269
270
  }
270
271
  else if (type instanceof Structures.CatchSystemExceptions) {
271
272
  // TODO: this is not completely correct
272
- const catchName = this.buildName(n.getFirstStatement());
273
+ const catchName = StatementFlow.buildName(n.getFirstStatement());
273
274
  const body = this.traverseBody(this.findBody(n), context);
274
275
  graph.addEdge(current, catchName, flow_graph_1.FLOW_EDGE_TYPE.undefined);
275
276
  graph.addGraph(catchName, body, flow_graph_1.FLOW_EDGE_TYPE.undefined);
276
277
  graph.addEdge(body.getEnd(), graph.getEnd(), flow_graph_1.FLOW_EDGE_TYPE.undefined);
277
278
  }
278
279
  else if (type instanceof Structures.Case) {
279
- const caseName = this.buildName(n.getFirstStatement());
280
+ const caseName = StatementFlow.buildName(n.getFirstStatement());
280
281
  graph.addEdge(current, caseName, flow_graph_1.FLOW_EDGE_TYPE.undefined);
281
282
  let othersFound = false;
282
283
  for (const w of n.findDirectStructures(Structures.When)) {
@@ -287,7 +288,7 @@ class StatementFlow {
287
288
  if (first.get() instanceof Statements.WhenOthers) {
288
289
  othersFound = true;
289
290
  }
290
- const firstName = this.buildName(first);
291
+ const firstName = StatementFlow.buildName(first);
291
292
  const sub = this.traverseBody(this.findBody(w), context);
292
293
  graph.addEdge(caseName, firstName, flow_graph_1.FLOW_EDGE_TYPE.undefined);
293
294
  graph.addGraph(firstName, sub, flow_graph_1.FLOW_EDGE_TYPE.undefined);
@@ -298,7 +299,7 @@ class StatementFlow {
298
299
  }
299
300
  }
300
301
  else if (type instanceof Structures.CaseType) {
301
- const caseName = this.buildName(n.getFirstStatement());
302
+ const caseName = StatementFlow.buildName(n.getFirstStatement());
302
303
  graph.addEdge(current, caseName, flow_graph_1.FLOW_EDGE_TYPE.undefined);
303
304
  let othersFound = false;
304
305
  for (const w of n.findDirectStructures(Structures.WhenType)) {
@@ -309,7 +310,7 @@ class StatementFlow {
309
310
  if (first.get() instanceof Statements.WhenOthers) {
310
311
  othersFound = true;
311
312
  }
312
- const firstName = this.buildName(first);
313
+ const firstName = StatementFlow.buildName(first);
313
314
  const sub = this.traverseBody(this.findBody(w), context);
314
315
  graph.addEdge(caseName, firstName, flow_graph_1.FLOW_EDGE_TYPE.undefined);
315
316
  graph.addGraph(firstName, sub, flow_graph_1.FLOW_EDGE_TYPE.undefined);
@@ -67,7 +67,7 @@ class Registry {
67
67
  }
68
68
  static abaplintVersion() {
69
69
  // magic, see build script "version.sh"
70
- return "2.113.64";
70
+ return "2.113.66";
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.64",
3
+ "version": "2.113.66",
4
4
  "description": "abaplint - Core API",
5
5
  "main": "build/src/index.js",
6
6
  "typings": "build/abaplint.d.ts",