@abaplint/core 2.113.64 → 2.113.65
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.
package/build/abaplint.d.ts
CHANGED
|
@@ -6116,7 +6116,7 @@ export declare class StatementFlow {
|
|
|
6116
6116
|
private runEvent;
|
|
6117
6117
|
private run;
|
|
6118
6118
|
private findBody;
|
|
6119
|
-
|
|
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
|
|
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 =
|
|
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 =
|
|
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 =
|
|
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 =
|
|
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 =
|
|
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);
|
|
@@ -236,7 +236,7 @@ class StatementFlow {
|
|
|
236
236
|
|| type instanceof Structures.Types) {
|
|
237
237
|
// these doesnt affect control flow, so just take the first statement
|
|
238
238
|
const statement = n.getFirstStatement();
|
|
239
|
-
const name =
|
|
239
|
+
const name = StatementFlow.buildName(statement);
|
|
240
240
|
graph.addEdge(current, name, flow_graph_1.FLOW_EDGE_TYPE.undefined);
|
|
241
241
|
graph.addEdge(name, graph.getEnd(), flow_graph_1.FLOW_EDGE_TYPE.undefined);
|
|
242
242
|
}
|
|
@@ -244,7 +244,7 @@ class StatementFlow {
|
|
|
244
244
|
|| type instanceof Structures.AtLast
|
|
245
245
|
|| type instanceof Structures.At
|
|
246
246
|
|| type instanceof Structures.OnChange) {
|
|
247
|
-
const name =
|
|
247
|
+
const name = StatementFlow.buildName(n.getFirstStatement());
|
|
248
248
|
const body = this.traverseBody(this.findBody(n), context);
|
|
249
249
|
graph.addEdge(current, name, flow_graph_1.FLOW_EDGE_TYPE.undefined);
|
|
250
250
|
graph.addGraph(name, body, flow_graph_1.FLOW_EDGE_TYPE.undefined);
|
|
@@ -252,13 +252,13 @@ class StatementFlow {
|
|
|
252
252
|
graph.addEdge(current, graph.getEnd(), flow_graph_1.FLOW_EDGE_TYPE.undefined);
|
|
253
253
|
}
|
|
254
254
|
else if (type instanceof Structures.Try) {
|
|
255
|
-
const tryName =
|
|
255
|
+
const tryName = StatementFlow.buildName(n.getFirstStatement());
|
|
256
256
|
const body = this.traverseBody(this.findBody(n), context);
|
|
257
257
|
graph.addEdge(current, tryName, flow_graph_1.FLOW_EDGE_TYPE.undefined);
|
|
258
258
|
graph.addGraph(tryName, body, flow_graph_1.FLOW_EDGE_TYPE.undefined);
|
|
259
259
|
graph.addEdge(body.getEnd(), graph.getEnd(), flow_graph_1.FLOW_EDGE_TYPE.undefined);
|
|
260
260
|
for (const c of n.findDirectStructures(Structures.Catch)) {
|
|
261
|
-
const catchName =
|
|
261
|
+
const catchName = StatementFlow.buildName(c.getFirstStatement());
|
|
262
262
|
const catchBody = this.traverseBody(this.findBody(c), context);
|
|
263
263
|
// TODO: this does not take exceptions into account
|
|
264
264
|
graph.addEdge(body.getEnd(), catchName, flow_graph_1.FLOW_EDGE_TYPE.undefined);
|
|
@@ -269,14 +269,14 @@ class StatementFlow {
|
|
|
269
269
|
}
|
|
270
270
|
else if (type instanceof Structures.CatchSystemExceptions) {
|
|
271
271
|
// TODO: this is not completely correct
|
|
272
|
-
const catchName =
|
|
272
|
+
const catchName = StatementFlow.buildName(n.getFirstStatement());
|
|
273
273
|
const body = this.traverseBody(this.findBody(n), context);
|
|
274
274
|
graph.addEdge(current, catchName, flow_graph_1.FLOW_EDGE_TYPE.undefined);
|
|
275
275
|
graph.addGraph(catchName, body, flow_graph_1.FLOW_EDGE_TYPE.undefined);
|
|
276
276
|
graph.addEdge(body.getEnd(), graph.getEnd(), flow_graph_1.FLOW_EDGE_TYPE.undefined);
|
|
277
277
|
}
|
|
278
278
|
else if (type instanceof Structures.Case) {
|
|
279
|
-
const caseName =
|
|
279
|
+
const caseName = StatementFlow.buildName(n.getFirstStatement());
|
|
280
280
|
graph.addEdge(current, caseName, flow_graph_1.FLOW_EDGE_TYPE.undefined);
|
|
281
281
|
let othersFound = false;
|
|
282
282
|
for (const w of n.findDirectStructures(Structures.When)) {
|
|
@@ -287,7 +287,7 @@ class StatementFlow {
|
|
|
287
287
|
if (first.get() instanceof Statements.WhenOthers) {
|
|
288
288
|
othersFound = true;
|
|
289
289
|
}
|
|
290
|
-
const firstName =
|
|
290
|
+
const firstName = StatementFlow.buildName(first);
|
|
291
291
|
const sub = this.traverseBody(this.findBody(w), context);
|
|
292
292
|
graph.addEdge(caseName, firstName, flow_graph_1.FLOW_EDGE_TYPE.undefined);
|
|
293
293
|
graph.addGraph(firstName, sub, flow_graph_1.FLOW_EDGE_TYPE.undefined);
|
|
@@ -298,7 +298,7 @@ class StatementFlow {
|
|
|
298
298
|
}
|
|
299
299
|
}
|
|
300
300
|
else if (type instanceof Structures.CaseType) {
|
|
301
|
-
const caseName =
|
|
301
|
+
const caseName = StatementFlow.buildName(n.getFirstStatement());
|
|
302
302
|
graph.addEdge(current, caseName, flow_graph_1.FLOW_EDGE_TYPE.undefined);
|
|
303
303
|
let othersFound = false;
|
|
304
304
|
for (const w of n.findDirectStructures(Structures.WhenType)) {
|
|
@@ -309,7 +309,7 @@ class StatementFlow {
|
|
|
309
309
|
if (first.get() instanceof Statements.WhenOthers) {
|
|
310
310
|
othersFound = true;
|
|
311
311
|
}
|
|
312
|
-
const firstName =
|
|
312
|
+
const firstName = StatementFlow.buildName(first);
|
|
313
313
|
const sub = this.traverseBody(this.findBody(w), context);
|
|
314
314
|
graph.addEdge(caseName, firstName, flow_graph_1.FLOW_EDGE_TYPE.undefined);
|
|
315
315
|
graph.addGraph(firstName, sub, flow_graph_1.FLOW_EDGE_TYPE.undefined);
|
package/build/src/registry.js
CHANGED