@abaplint/core 2.85.0 → 2.85.4
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/1_lexer/lexer.js +6 -1
- package/build/src/abap/2_statements/expressions/form_param.js +1 -1
- 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/5_syntax/_object_oriented.js +9 -2
- package/build/src/abap/5_syntax/basic_types.js +3 -0
- package/build/src/abap/5_syntax/expressions/form_param.js +1 -1
- package/build/src/abap/types/class_definition.js +1 -1
- package/build/src/objects/table.js +2 -4
- package/build/src/registry.js +1 -1
- package/package.json +1 -1
|
@@ -319,7 +319,12 @@ class Lexer {
|
|
|
319
319
|
&& ahead !== "`") {
|
|
320
320
|
// end of ping
|
|
321
321
|
this.add();
|
|
322
|
-
|
|
322
|
+
if (ahead === `"`) {
|
|
323
|
+
this.m = Mode.Comment;
|
|
324
|
+
}
|
|
325
|
+
else {
|
|
326
|
+
this.m = Mode.Normal;
|
|
327
|
+
}
|
|
323
328
|
}
|
|
324
329
|
else if (this.m === Mode.Template
|
|
325
330
|
&& buf.length > 1
|
|
@@ -5,7 +5,7 @@ const combi_1 = require("../combi");
|
|
|
5
5
|
const _1 = require(".");
|
|
6
6
|
class FormParam extends combi_1.Expression {
|
|
7
7
|
getRunnable() {
|
|
8
|
-
const stru = (0, combi_1.seq)("STRUCTURE", _1.
|
|
8
|
+
const stru = (0, combi_1.seq)("STRUCTURE", _1.SimpleFieldChain);
|
|
9
9
|
const ret = (0, combi_1.seq)((0, combi_1.altPrio)(_1.PassByValue, _1.FormParamName), (0, combi_1.optPrio)((0, combi_1.altPrio)(_1.FormParamType, stru)));
|
|
10
10
|
return ret;
|
|
11
11
|
}
|
|
@@ -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;
|
|
@@ -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
|
}
|
|
@@ -11,7 +11,7 @@ class FormParam {
|
|
|
11
11
|
const nameToken = (_a = node.findFirstExpression(expressions_1.FormParamName)) === null || _a === void 0 ? void 0 : _a.getFirstToken();
|
|
12
12
|
if (node.findDirectTokenByText("STRUCTURE") && nameToken) {
|
|
13
13
|
// STRUCTURES typing
|
|
14
|
-
const typeName = (_b = node.findDirectExpression(expressions_1.
|
|
14
|
+
const typeName = (_b = node.findDirectExpression(expressions_1.SimpleFieldChain)) === null || _b === void 0 ? void 0 : _b.getFirstToken().getStr();
|
|
15
15
|
let type = undefined;
|
|
16
16
|
if (typeName) {
|
|
17
17
|
type = (_c = scope.findType(typeName)) === null || _c === void 0 ? void 0 : _c.getType();
|
|
@@ -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");
|
|
@@ -93,10 +93,8 @@ class Table extends _abstract_object_1.AbstractObject {
|
|
|
93
93
|
if (field.GROUPNAME !== undefined) {
|
|
94
94
|
components.push({ name: field.GROUPNAME, type: found });
|
|
95
95
|
}
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
components.push({ name: c.name, type: c.type });
|
|
99
|
-
}
|
|
96
|
+
for (const c of found.getComponents()) {
|
|
97
|
+
components.push({ name: c.name, type: c.type });
|
|
100
98
|
}
|
|
101
99
|
}
|
|
102
100
|
else if ((((_a = field.PRECFIELD) === null || _a === void 0 ? void 0 : _a.startsWith("CI_")) || ((_b = field.PRECFIELD) === null || _b === void 0 ? void 0 : _b.startsWith("SI_")))
|
package/build/src/registry.js
CHANGED