@abaplint/core 2.112.8 → 2.112.10
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/parameter_exception.js +1 -1
- package/build/src/abap/5_syntax/expressions/field_chain.js +4 -0
- package/build/src/abap/5_syntax/expressions/method_parameters.js +10 -1
- package/build/src/abap/5_syntax/statements/call_function.js +4 -0
- package/build/src/registry.js +1 -1
- package/build/src/rules/classic_exceptions_overlap.js +1 -1
- package/package.json +3 -3
|
@@ -6,7 +6,7 @@ const _1 = require(".");
|
|
|
6
6
|
class ParameterException extends combi_1.Expression {
|
|
7
7
|
getRunnable() {
|
|
8
8
|
const name = (0, combi_1.altPrio)("OTHERS", _1.ParameterName);
|
|
9
|
-
return (0, combi_1.seq)(name, "=", _1.
|
|
9
|
+
return (0, combi_1.seq)(name, "=", (0, combi_1.altPrio)(_1.Integer, _1.SimpleFieldChain), (0, combi_1.optPrio)((0, combi_1.seq)("MESSAGE", _1.Target)));
|
|
10
10
|
}
|
|
11
11
|
}
|
|
12
12
|
exports.ParameterException = ParameterException;
|
|
@@ -152,6 +152,10 @@ class FieldChain {
|
|
|
152
152
|
&& node.get() instanceof Expressions.SourceField) {
|
|
153
153
|
return new source_field_1.SourceField().runSyntax(node, input, type);
|
|
154
154
|
}
|
|
155
|
+
else if (node instanceof nodes_1.ExpressionNode
|
|
156
|
+
&& node.get() instanceof Expressions.Field) {
|
|
157
|
+
return new source_field_1.SourceField().runSyntax(node, input, type);
|
|
158
|
+
}
|
|
155
159
|
else if (node.get() instanceof Expressions.ClassName) {
|
|
156
160
|
const classTok = node.getFirstToken();
|
|
157
161
|
const classNam = classTok.getStr();
|
|
@@ -10,6 +10,8 @@ const source_1 = require("./source");
|
|
|
10
10
|
const _type_utils_1 = require("../_type_utils");
|
|
11
11
|
const _syntax_input_1 = require("../_syntax_input");
|
|
12
12
|
const assert_error_1 = require("../assert_error");
|
|
13
|
+
const field_chain_1 = require("./field_chain");
|
|
14
|
+
const _reference_1 = require("../_reference");
|
|
13
15
|
class MethodParameters {
|
|
14
16
|
constructor() {
|
|
15
17
|
this.requiredParameters = undefined;
|
|
@@ -42,7 +44,14 @@ class MethodParameters {
|
|
|
42
44
|
this.checkReceiving(children.shift(), input, method);
|
|
43
45
|
break;
|
|
44
46
|
case "EXCEPTIONS":
|
|
45
|
-
|
|
47
|
+
{
|
|
48
|
+
// todo, old style exceptions
|
|
49
|
+
const node = children.shift();
|
|
50
|
+
const exceptions = node.findFirstExpression(Expressions.ParameterException);
|
|
51
|
+
for (const s of (exceptions === null || exceptions === void 0 ? void 0 : exceptions.findAllExpressions(Expressions.SimpleFieldChain)) || []) {
|
|
52
|
+
new field_chain_1.FieldChain().runSyntax(s, input, _reference_1.ReferenceType.DataReadReference);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
46
55
|
break;
|
|
47
56
|
default:
|
|
48
57
|
throw new assert_error_1.AssertError("MethodParameters, unexpected token, " + name);
|
|
@@ -38,6 +38,10 @@ class CallFunction {
|
|
|
38
38
|
for (const s of node.findDirectExpressions(Expressions.SimpleSource2)) {
|
|
39
39
|
new source_1.Source().runSyntax(s, input);
|
|
40
40
|
}
|
|
41
|
+
const exceptions = node.findFirstExpression(Expressions.ParameterException);
|
|
42
|
+
for (const s of (exceptions === null || exceptions === void 0 ? void 0 : exceptions.findAllExpressions(Expressions.SimpleFieldChain)) || []) {
|
|
43
|
+
new field_chain_1.FieldChain().runSyntax(s, input, _reference_1.ReferenceType.DataReadReference);
|
|
44
|
+
}
|
|
41
45
|
}
|
|
42
46
|
}
|
|
43
47
|
exports.CallFunction = CallFunction;
|
package/build/src/registry.js
CHANGED
|
@@ -51,7 +51,7 @@ class ClassicExceptionsOverlap extends _abap_rule_1.ABAPRule {
|
|
|
51
51
|
for (const p of struc.findAllExpressions(Expressions.ParameterListExceptions)) {
|
|
52
52
|
const set = new Set();
|
|
53
53
|
for (const e of p.findAllExpressions(Expressions.ParameterException)) {
|
|
54
|
-
const text = (_a = e.findDirectExpression(Expressions.
|
|
54
|
+
const text = (_a = e.findDirectExpression(Expressions.Integer)) === null || _a === void 0 ? void 0 : _a.concatTokens().toUpperCase();
|
|
55
55
|
if (text === undefined) {
|
|
56
56
|
continue;
|
|
57
57
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abaplint/core",
|
|
3
|
-
"version": "2.112.
|
|
3
|
+
"version": "2.112.10",
|
|
4
4
|
"description": "abaplint - Core API",
|
|
5
5
|
"main": "build/src/index.js",
|
|
6
6
|
"typings": "build/abaplint.d.ts",
|
|
@@ -51,9 +51,9 @@
|
|
|
51
51
|
"homepage": "https://abaplint.org",
|
|
52
52
|
"devDependencies": {
|
|
53
53
|
"@microsoft/api-extractor": "^7.47.4",
|
|
54
|
-
"@types/chai": "^4.3.
|
|
54
|
+
"@types/chai": "^4.3.17",
|
|
55
55
|
"@types/mocha": "^10.0.7",
|
|
56
|
-
"@types/node": "^22.0.
|
|
56
|
+
"@types/node": "^22.0.2",
|
|
57
57
|
"chai": "^4.5.0",
|
|
58
58
|
"eslint": "^8.57.0",
|
|
59
59
|
"mocha": "^10.7.0",
|