@abaplint/core 2.85.1 → 2.85.5
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/src/abap/2_statements/expressions/sql_alias_field.js +1 -1
- package/build/src/abap/2_statements/expressions/sql_source.js +1 -1
- package/build/src/abap/2_statements/statements/assign.js +4 -3
- package/build/src/abap/2_statements/statements/modify_internal.js +1 -1
- package/build/src/abap/5_syntax/_object_oriented.js +9 -2
- package/build/src/abap/5_syntax/basic_types.js +3 -0
- package/build/src/abap/types/class_definition.js +1 -1
- package/build/src/registry.js +1 -1
- package/package.json +1 -1
|
@@ -4,7 +4,7 @@ exports.SQLAliasField = void 0;
|
|
|
4
4
|
const combi_1 = require("../combi");
|
|
5
5
|
class SQLAliasField extends combi_1.Expression {
|
|
6
6
|
getRunnable() {
|
|
7
|
-
return (0, combi_1.regex)(
|
|
7
|
+
return (0, combi_1.regex)(/^(\/\w+\/)?\w+~\w+$/);
|
|
8
8
|
}
|
|
9
9
|
}
|
|
10
10
|
exports.SQLAliasField = SQLAliasField;
|
|
@@ -10,7 +10,7 @@ class SQLSource extends combi_1.Expression {
|
|
|
10
10
|
const paren = (0, combi_1.seq)((0, combi_1.tok)(tokens_1.ParenLeftW), _1.Source, (0, combi_1.tok)(tokens_1.WParenRightW));
|
|
11
11
|
// todo, this Source must be a simple field?
|
|
12
12
|
const at = (0, combi_1.ver)(version_1.Version.v740sp05, (0, combi_1.seq)((0, combi_1.tok)(tokens_1.WAt), (0, combi_1.altPrio)(_1.Source, paren)));
|
|
13
|
-
return (0, combi_1.
|
|
13
|
+
return (0, combi_1.alt)(_1.SQLAliasField, _1.Source, at);
|
|
14
14
|
}
|
|
15
15
|
}
|
|
16
16
|
exports.SQLSource = SQLSource;
|
|
@@ -10,13 +10,14 @@ class Assign {
|
|
|
10
10
|
const tableField = (0, combi_1.seq)("TABLE FIELD", (0, combi_1.alt)(expressions_1.Source, expressions_1.Dynamic));
|
|
11
11
|
const arrow = (0, combi_1.alt)((0, combi_1.tok)(tokens_1.InstanceArrow), (0, combi_1.tok)(tokens_1.StaticArrow));
|
|
12
12
|
const source = (0, combi_1.alt)((0, combi_1.seq)(expressions_1.Source, (0, combi_1.opt)((0, combi_1.seq)(arrow, expressions_1.Dynamic))), component, tableField, (0, combi_1.seq)(expressions_1.Dynamic, (0, combi_1.opt)((0, combi_1.seq)(arrow, (0, combi_1.alt)(expressions_1.Field, expressions_1.Dynamic)))));
|
|
13
|
-
const type = (0, combi_1.seq)("TYPE", (0, combi_1.alt)(expressions_1.Dynamic, expressions_1.
|
|
13
|
+
const type = (0, combi_1.seq)("TYPE", (0, combi_1.alt)(expressions_1.Dynamic, expressions_1.TypeName));
|
|
14
14
|
const like = (0, combi_1.seq)("LIKE", (0, combi_1.alt)(expressions_1.Dynamic, expressions_1.Source));
|
|
15
15
|
const handle = (0, combi_1.seq)("TYPE HANDLE", expressions_1.Source);
|
|
16
16
|
const range = (0, combi_1.seq)("RANGE", expressions_1.Source);
|
|
17
17
|
const decimals = (0, combi_1.seq)("DECIMALS", expressions_1.Source);
|
|
18
|
-
const casting = (0, combi_1.seq)(
|
|
19
|
-
const
|
|
18
|
+
const casting = (0, combi_1.seq)("CASTING", (0, combi_1.opt)((0, combi_1.alt)(like, handle, (0, combi_1.per)(type, decimals))));
|
|
19
|
+
const obsoleteType = (0, combi_1.seq)("TYPE", expressions_1.Source, (0, combi_1.optPrio)(decimals));
|
|
20
|
+
const ret = (0, combi_1.seq)("ASSIGN", (0, combi_1.opt)((0, combi_1.seq)(expressions_1.Target, "INCREMENT")), source, "TO", expressions_1.FSTarget, (0, combi_1.opt)((0, combi_1.altPrio)(casting, obsoleteType)), (0, combi_1.opt)(range));
|
|
20
21
|
return ret;
|
|
21
22
|
}
|
|
22
23
|
}
|
|
@@ -7,7 +7,7 @@ class ModifyInternal {
|
|
|
7
7
|
getMatcher() {
|
|
8
8
|
const index = (0, combi_1.seq)("INDEX", expressions_1.Source);
|
|
9
9
|
const from = (0, combi_1.seq)("FROM", expressions_1.Source);
|
|
10
|
-
const transporting = (0, combi_1.seq)("TRANSPORTING", (0, combi_1.plus)((0, combi_1.alt)(expressions_1.
|
|
10
|
+
const transporting = (0, combi_1.seq)("TRANSPORTING", (0, combi_1.plus)((0, combi_1.alt)(expressions_1.ComponentChainSimple, expressions_1.Dynamic)));
|
|
11
11
|
const where = (0, combi_1.seq)("WHERE", expressions_1.ComponentCond);
|
|
12
12
|
const assigning = (0, combi_1.seq)("ASSIGNING", expressions_1.FSTarget);
|
|
13
13
|
const using = (0, combi_1.seq)("USING KEY", expressions_1.SimpleName);
|
|
@@ -195,13 +195,14 @@ class ObjectOriented {
|
|
|
195
195
|
if (def === undefined || name === undefined) {
|
|
196
196
|
return undefined;
|
|
197
197
|
}
|
|
198
|
+
const upper = name.toUpperCase();
|
|
198
199
|
for (const a of def.getAttributes().getConstants()) {
|
|
199
|
-
if (a.getName().toUpperCase() ===
|
|
200
|
+
if (a.getName().toUpperCase() === upper) {
|
|
200
201
|
return a;
|
|
201
202
|
}
|
|
202
203
|
}
|
|
203
204
|
for (const a of def.getAliases().getAll()) {
|
|
204
|
-
if (a.getName().toUpperCase() ===
|
|
205
|
+
if (a.getName().toUpperCase() === upper) {
|
|
205
206
|
const comp = a.getComponent();
|
|
206
207
|
const res = this.searchConstantName(this.scope.findObjectDefinition(comp.split("~")[0]), comp.split("~")[1]);
|
|
207
208
|
if (res) {
|
|
@@ -209,6 +210,12 @@ class ObjectOriented {
|
|
|
209
210
|
}
|
|
210
211
|
}
|
|
211
212
|
}
|
|
213
|
+
if (name.includes("~")) {
|
|
214
|
+
const interfaceName = upper.split("~")[0];
|
|
215
|
+
if (def.getImplementing().some((a) => a.name.toUpperCase() === interfaceName)) {
|
|
216
|
+
return this.searchConstantName(this.scope.findInterfaceDefinition(interfaceName), name.split("~")[1]);
|
|
217
|
+
}
|
|
218
|
+
}
|
|
212
219
|
const sup = def.getSuperClass();
|
|
213
220
|
if (sup) {
|
|
214
221
|
return this.searchConstantName(this.findSuperDefinition(sup), name);
|
|
@@ -65,6 +65,9 @@ class BasicTypes {
|
|
|
65
65
|
if (chain === undefined) {
|
|
66
66
|
chain = node.findFirstExpression(Expressions.FieldSub);
|
|
67
67
|
}
|
|
68
|
+
if (chain === undefined) {
|
|
69
|
+
chain = node.findFirstExpression(Expressions.SimpleFieldChain);
|
|
70
|
+
}
|
|
68
71
|
if (chain === undefined) {
|
|
69
72
|
throw new Error("resolveLikeName, chain undefined");
|
|
70
73
|
}
|
|
@@ -35,11 +35,11 @@ class ClassDefinition extends _identifier_1.Identifier {
|
|
|
35
35
|
helper.addAliasedTypes(this.aliases);
|
|
36
36
|
this.attributes = new class_attributes_1.Attributes(this.node, this.filename, scope);
|
|
37
37
|
this.types = this.attributes.getTypes();
|
|
38
|
-
this.methodDefs = new method_definitions_1.MethodDefinitions(this.node, this.filename, scope);
|
|
39
38
|
const events = this.node.findAllStatements(Statements.Events);
|
|
40
39
|
for (const e of events) {
|
|
41
40
|
this.events.push(new event_definition_1.EventDefinition(e, visibility_1.Visibility.Public, this.filename, scope)); // todo, all these are not Public
|
|
42
41
|
}
|
|
42
|
+
this.methodDefs = new method_definitions_1.MethodDefinitions(this.node, this.filename, scope);
|
|
43
43
|
scope.pop(node.getLastToken().getEnd());
|
|
44
44
|
const concat = this.node.findFirstStatement(Statements.ClassDefinition).concatTokens().toUpperCase();
|
|
45
45
|
this.testing = concat.includes(" FOR TESTING");
|
package/build/src/registry.js
CHANGED