@abaplint/core 2.113.117 → 2.113.119
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 +2 -0
- package/build/src/abap/3_structures/structures/loop.js +1 -1
- package/build/src/abap/3_structures/structures/process_after_input.js +2 -1
- package/build/src/abap/5_syntax/global_definitions/find_global_definitions.js +3 -3
- package/build/src/abap/5_syntax/statements/perform.js +4 -1
- package/build/src/objects/data_element.js +7 -1
- package/build/src/objects/table.js +10 -20
- package/build/src/registry.js +1 -1
- package/package.json +2 -2
package/build/abaplint.d.ts
CHANGED
|
@@ -1625,6 +1625,7 @@ declare class DataDefinition_2 extends Expression {
|
|
|
1625
1625
|
|
|
1626
1626
|
declare class DataElement extends AbstractObject {
|
|
1627
1627
|
private parsedXML;
|
|
1628
|
+
private parsedType;
|
|
1628
1629
|
getType(): string;
|
|
1629
1630
|
getDescription(): string | undefined;
|
|
1630
1631
|
getAllowedNaming(): {
|
|
@@ -6826,6 +6827,7 @@ declare class SystemCall implements IStatement {
|
|
|
6826
6827
|
|
|
6827
6828
|
declare class Table extends AbstractObject {
|
|
6828
6829
|
private parsedData;
|
|
6830
|
+
private parsedType;
|
|
6829
6831
|
getType(): string;
|
|
6830
6832
|
getDescription(): string | undefined;
|
|
6831
6833
|
getAllowedNaming(): IAllowedNaming;
|
|
@@ -6,7 +6,7 @@ const _combi_1 = require("./_combi");
|
|
|
6
6
|
const _1 = require(".");
|
|
7
7
|
class Loop {
|
|
8
8
|
getMatcher() {
|
|
9
|
-
return (0, _combi_1.beginEnd)((0, _combi_1.sta)(Statements.Loop), (0, _combi_1.star)((0, _combi_1.sub)(_1.Body)), (0, _combi_1.sta)(Statements.EndLoop));
|
|
9
|
+
return (0, _combi_1.beginEnd)((0, _combi_1.sta)(Statements.Loop), (0, _combi_1.alt)((0, _combi_1.sub)(_1.Chain), (0, _combi_1.star)((0, _combi_1.sub)(_1.Body))), (0, _combi_1.sta)(Statements.EndLoop));
|
|
10
10
|
}
|
|
11
11
|
}
|
|
12
12
|
exports.Loop = Loop;
|
|
@@ -4,9 +4,10 @@ exports.ProcessAfterInput = void 0;
|
|
|
4
4
|
const Statements = require("../../2_statements/statements");
|
|
5
5
|
const _combi_1 = require("./_combi");
|
|
6
6
|
const chain_1 = require("./chain");
|
|
7
|
+
const loop_1 = require("./loop");
|
|
7
8
|
class ProcessAfterInput {
|
|
8
9
|
getMatcher() {
|
|
9
|
-
const pai = (0, _combi_1.star)((0, _combi_1.alt)((0, _combi_1.sta)(Statements.Module), (0, _combi_1.sta)(Statements.Field), (0, _combi_1.sta)(Statements.CallSubscreen), (0, _combi_1.sub)(chain_1.Chain)));
|
|
10
|
+
const pai = (0, _combi_1.star)((0, _combi_1.alt)((0, _combi_1.sta)(Statements.Module), (0, _combi_1.sta)(Statements.Field), (0, _combi_1.sta)(Statements.CallSubscreen), (0, _combi_1.sub)(chain_1.Chain), (0, _combi_1.sub)(loop_1.Loop)));
|
|
10
11
|
return (0, _combi_1.seq)((0, _combi_1.sta)(Statements.ProcessAfterInput), pai);
|
|
11
12
|
}
|
|
12
13
|
}
|
|
@@ -25,11 +25,11 @@ class FindGlobalDefinitions {
|
|
|
25
25
|
candidates.push(o);
|
|
26
26
|
}
|
|
27
27
|
else if (o instanceof objects_1.DataElement
|
|
28
|
-
|| o instanceof objects_1.
|
|
28
|
+
|| o instanceof objects_1.Table
|
|
29
29
|
|| o instanceof objects_1.TableType
|
|
30
|
+
|| o instanceof objects_1.View
|
|
30
31
|
|| o instanceof objects_1.LockObject
|
|
31
|
-
|| o instanceof objects_1.AuthorizationCheckField
|
|
32
|
-
|| o instanceof objects_1.Table) {
|
|
32
|
+
|| o instanceof objects_1.AuthorizationCheckField) {
|
|
33
33
|
o.parseType(this.reg); // make sure the references are set after parsing finishes
|
|
34
34
|
}
|
|
35
35
|
}
|
|
@@ -8,6 +8,7 @@ const source_1 = require("../expressions/source");
|
|
|
8
8
|
const target_1 = require("../expressions/target");
|
|
9
9
|
const _syntax_input_1 = require("../_syntax_input");
|
|
10
10
|
const assert_error_1 = require("../assert_error");
|
|
11
|
+
const dynamic_1 = require("../expressions/dynamic");
|
|
11
12
|
class Perform {
|
|
12
13
|
runSyntax(node, input) {
|
|
13
14
|
if (!(node.get() instanceof Statements.Perform)) {
|
|
@@ -35,7 +36,9 @@ class Perform {
|
|
|
35
36
|
if (node.findFirstExpression(Expressions.IncludeName)) {
|
|
36
37
|
return; // in external program, not checked, todo
|
|
37
38
|
}
|
|
38
|
-
|
|
39
|
+
const dynamic = node.findFirstExpression(Expressions.Dynamic);
|
|
40
|
+
if (dynamic) {
|
|
41
|
+
new dynamic_1.Dynamic().runSyntax(dynamic, input);
|
|
39
42
|
return; // todo, maybe some parts can be checked
|
|
40
43
|
}
|
|
41
44
|
const expr = node.findFirstExpression(Expressions.FormName);
|
|
@@ -8,6 +8,7 @@ class DataElement extends _abstract_object_1.AbstractObject {
|
|
|
8
8
|
constructor() {
|
|
9
9
|
super(...arguments);
|
|
10
10
|
this.parsedXML = undefined;
|
|
11
|
+
this.parsedType = undefined;
|
|
11
12
|
}
|
|
12
13
|
getType() {
|
|
13
14
|
return "DTEL";
|
|
@@ -25,6 +26,7 @@ class DataElement extends _abstract_object_1.AbstractObject {
|
|
|
25
26
|
}
|
|
26
27
|
setDirty() {
|
|
27
28
|
this.parsedXML = undefined;
|
|
29
|
+
this.parsedType = undefined;
|
|
28
30
|
super.setDirty();
|
|
29
31
|
}
|
|
30
32
|
getDomainName() {
|
|
@@ -45,6 +47,9 @@ class DataElement extends _abstract_object_1.AbstractObject {
|
|
|
45
47
|
lookup = { type: new Types.UnknownType("Data Element " + this.getName() + ", parser error") };
|
|
46
48
|
}
|
|
47
49
|
else {
|
|
50
|
+
if (this.parsedType) {
|
|
51
|
+
return this.parsedType;
|
|
52
|
+
}
|
|
48
53
|
const ddic = new ddic_1.DDIC(reg);
|
|
49
54
|
if (this.parsedXML.refkind === "D") {
|
|
50
55
|
if (this.parsedXML.domname === undefined || this.parsedXML.domname === "") {
|
|
@@ -84,7 +89,8 @@ class DataElement extends _abstract_object_1.AbstractObject {
|
|
|
84
89
|
references.push({ object: lookup.object });
|
|
85
90
|
}
|
|
86
91
|
reg.getDDICReferences().setUsing(this, references);
|
|
87
|
-
|
|
92
|
+
this.parsedType = lookup.type;
|
|
93
|
+
return this.parsedType;
|
|
88
94
|
}
|
|
89
95
|
parse() {
|
|
90
96
|
var _a, _b, _c;
|
|
@@ -26,6 +26,10 @@ var TableCategory;
|
|
|
26
26
|
TableCategory["Append"] = "APPEND";
|
|
27
27
|
})(TableCategory || (exports.TableCategory = TableCategory = {}));
|
|
28
28
|
class Table extends _abstract_object_1.AbstractObject {
|
|
29
|
+
constructor() {
|
|
30
|
+
super(...arguments);
|
|
31
|
+
this.parsedType = undefined;
|
|
32
|
+
}
|
|
29
33
|
getType() {
|
|
30
34
|
return "TABL";
|
|
31
35
|
}
|
|
@@ -50,6 +54,7 @@ class Table extends _abstract_object_1.AbstractObject {
|
|
|
50
54
|
}
|
|
51
55
|
setDirty() {
|
|
52
56
|
this.parsedData = undefined;
|
|
57
|
+
this.parsedType = undefined;
|
|
53
58
|
super.setDirty();
|
|
54
59
|
}
|
|
55
60
|
listKeys(reg) {
|
|
@@ -87,6 +92,9 @@ class Table extends _abstract_object_1.AbstractObject {
|
|
|
87
92
|
&& this.parsedData.dataClass === "USER3") {
|
|
88
93
|
return new Types.UnknownType("Data class = USER3 not allowed in cloud");
|
|
89
94
|
}
|
|
95
|
+
if (this.parsedType) {
|
|
96
|
+
return this.parsedType;
|
|
97
|
+
}
|
|
90
98
|
const references = [];
|
|
91
99
|
const components = [];
|
|
92
100
|
const ddic = new ddic_1.DDIC(reg);
|
|
@@ -137,25 +145,6 @@ class Table extends _abstract_object_1.AbstractObject {
|
|
|
137
145
|
else {
|
|
138
146
|
components.push({ name: field.FIELDNAME, type: found });
|
|
139
147
|
}
|
|
140
|
-
/*
|
|
141
|
-
} else if (comptype === "S" && field.FIELDNAME.startsWith(".INCLU-")) {
|
|
142
|
-
const lookup = ddic.lookupTableOrView(field.PRECFIELD);
|
|
143
|
-
if (lookup.object) {
|
|
144
|
-
references.push({object: lookup.object});
|
|
145
|
-
}
|
|
146
|
-
const found = lookup.type;
|
|
147
|
-
if (found instanceof Types.VoidType) {
|
|
148
|
-
// set the full structure to void
|
|
149
|
-
return found;
|
|
150
|
-
} else if (found instanceof Types.StructureType) {
|
|
151
|
-
const suffix = field.FIELDNAME.split("-")[1];
|
|
152
|
-
for (const c of found.getComponents()) {
|
|
153
|
-
components.push({name: c.name + suffix, type: c.type});
|
|
154
|
-
}
|
|
155
|
-
} else if (found instanceof Types.UnknownType) {
|
|
156
|
-
return found;
|
|
157
|
-
}
|
|
158
|
-
*/
|
|
159
148
|
}
|
|
160
149
|
else if (comptype === "S") {
|
|
161
150
|
const lookup = ddic.lookupTableOrView(field.ROLLNAME);
|
|
@@ -250,7 +239,8 @@ class Table extends _abstract_object_1.AbstractObject {
|
|
|
250
239
|
return new Types.UnknownType("Table/Structure " + this.getName() + " does not contain any components");
|
|
251
240
|
}
|
|
252
241
|
reg.getDDICReferences().setUsing(this, references);
|
|
253
|
-
|
|
242
|
+
this.parsedType = new Types.StructureType(components, this.getName(), this.getName(), this.getDescription());
|
|
243
|
+
return this.parsedType;
|
|
254
244
|
}
|
|
255
245
|
getTableCategory() {
|
|
256
246
|
var _a;
|
package/build/src/registry.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abaplint/core",
|
|
3
|
-
"version": "2.113.
|
|
3
|
+
"version": "2.113.119",
|
|
4
4
|
"description": "abaplint - Core API",
|
|
5
5
|
"main": "build/src/index.js",
|
|
6
6
|
"typings": "build/abaplint.d.ts",
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
"@microsoft/api-extractor": "^7.52.8",
|
|
54
54
|
"@types/chai": "^4.3.20",
|
|
55
55
|
"@types/mocha": "^10.0.10",
|
|
56
|
-
"@types/node": "^22.15.
|
|
56
|
+
"@types/node": "^22.15.19",
|
|
57
57
|
"chai": "^4.5.0",
|
|
58
58
|
"eslint": "^9.27.0",
|
|
59
59
|
"mocha": "^11.3.0",
|