@abaplint/core 2.115.19 → 2.115.20
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.
|
@@ -9,7 +9,7 @@ class FunctionParameters extends combi_1.Expression {
|
|
|
9
9
|
const importing = (0, combi_1.seq)("IMPORTING", _1.ParameterListT);
|
|
10
10
|
const changing = (0, combi_1.seq)("CHANGING", _1.ParameterListT);
|
|
11
11
|
const tables = (0, combi_1.seq)("TABLES", _1.ParameterListT);
|
|
12
|
-
const exceptions = (0, combi_1.seq)("EXCEPTIONS", (0, combi_1.
|
|
12
|
+
const exceptions = (0, combi_1.seq)("EXCEPTIONS", (0, combi_1.altPrio)(_1.ParameterListExceptions, (0, combi_1.plus)(_1.Field)));
|
|
13
13
|
const long = (0, combi_1.seq)((0, combi_1.optPrio)(exporting), (0, combi_1.optPrio)(importing), (0, combi_1.optPrio)(tables), (0, combi_1.optPrio)(changing), (0, combi_1.optPrio)(exceptions));
|
|
14
14
|
return long;
|
|
15
15
|
}
|
package/build/src/registry.js
CHANGED
package/build/src/rules/index.js
CHANGED
|
@@ -129,6 +129,7 @@ __exportStar(require("./omit_parameter_name"), exports);
|
|
|
129
129
|
__exportStar(require("./omit_preceding_zeros"), exports);
|
|
130
130
|
__exportStar(require("./omit_receiving"), exports);
|
|
131
131
|
__exportStar(require("./parser_702_chaining"), exports);
|
|
132
|
+
__exportStar(require("./parser_bad_exceptions"), exports);
|
|
132
133
|
__exportStar(require("./parser_error"), exports);
|
|
133
134
|
__exportStar(require("./parser_missing_space"), exports);
|
|
134
135
|
__exportStar(require("./pragma_style"), exports);
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ParserBadExceptions = exports.ParserBadExceptionsConf = void 0;
|
|
4
|
+
const Statements = require("../abap/2_statements/statements");
|
|
5
|
+
const Expressions = require("../abap/2_statements/expressions");
|
|
6
|
+
const issue_1 = require("../issue");
|
|
7
|
+
const _abap_rule_1 = require("./_abap_rule");
|
|
8
|
+
const _basic_rule_config_1 = require("./_basic_rule_config");
|
|
9
|
+
const _irule_1 = require("./_irule");
|
|
10
|
+
// todo: this rule needs refactoring
|
|
11
|
+
class ParserBadExceptionsConf extends _basic_rule_config_1.BasicRuleConfig {
|
|
12
|
+
}
|
|
13
|
+
exports.ParserBadExceptionsConf = ParserBadExceptionsConf;
|
|
14
|
+
class ParserBadExceptions extends _abap_rule_1.ABAPRule {
|
|
15
|
+
constructor() {
|
|
16
|
+
super(...arguments);
|
|
17
|
+
this.conf = new ParserBadExceptionsConf();
|
|
18
|
+
}
|
|
19
|
+
getMetadata() {
|
|
20
|
+
return {
|
|
21
|
+
key: "parser_bad_exceptions",
|
|
22
|
+
title: "Parser Error, bad EXCEPTIONS in CALL FUNCTION",
|
|
23
|
+
shortDescription: `Checks for syntax not recognized by abaplint, related to EXCEPTIONS in CALL FUNCTION.`,
|
|
24
|
+
tags: [_irule_1.RuleTag.Syntax, _irule_1.RuleTag.SingleFile],
|
|
25
|
+
/*
|
|
26
|
+
badExample: `IF ( foo = 'bar').`,
|
|
27
|
+
goodExample: `IF ( foo = 'bar' ).`,
|
|
28
|
+
*/
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
getConfig() {
|
|
32
|
+
return this.conf;
|
|
33
|
+
}
|
|
34
|
+
setConfig(conf) {
|
|
35
|
+
this.conf = conf;
|
|
36
|
+
}
|
|
37
|
+
runParsed(file) {
|
|
38
|
+
var _a;
|
|
39
|
+
const issues = [];
|
|
40
|
+
for (const statement of file.getStatements()) {
|
|
41
|
+
if (!(statement.get() instanceof Statements.CallFunction)) {
|
|
42
|
+
continue;
|
|
43
|
+
}
|
|
44
|
+
const found = (_a = statement.findDirectExpression(Expressions.FunctionParameters)) === null || _a === void 0 ? void 0 : _a.findDirectExpression(Expressions.Field);
|
|
45
|
+
if (found === undefined) {
|
|
46
|
+
continue;
|
|
47
|
+
}
|
|
48
|
+
const message = "Bad EXCEPTIONS syntax in CALL FUNCTION";
|
|
49
|
+
issues.push(issue_1.Issue.atToken(file, found.getFirstToken(), message, this.getMetadata().key, this.conf.severity));
|
|
50
|
+
}
|
|
51
|
+
return issues;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
exports.ParserBadExceptions = ParserBadExceptions;
|
|
55
|
+
//# sourceMappingURL=parser_bad_exceptions.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abaplint/core",
|
|
3
|
-
"version": "2.115.
|
|
3
|
+
"version": "2.115.20",
|
|
4
4
|
"description": "abaplint - Core API",
|
|
5
5
|
"main": "build/src/index.js",
|
|
6
6
|
"typings": "build/abaplint.d.ts",
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
},
|
|
51
51
|
"homepage": "https://abaplint.org",
|
|
52
52
|
"devDependencies": {
|
|
53
|
-
"@microsoft/api-extractor": "^7.56.
|
|
53
|
+
"@microsoft/api-extractor": "^7.56.2",
|
|
54
54
|
"@types/chai": "^4.3.20",
|
|
55
55
|
"@types/mocha": "^10.0.10",
|
|
56
56
|
"@types/node": "^24.10.10",
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
"mocha": "^11.7.5",
|
|
60
60
|
"c8": "^10.1.3",
|
|
61
61
|
"source-map-support": "^0.5.21",
|
|
62
|
-
"ts-json-schema-generator": "
|
|
62
|
+
"ts-json-schema-generator": "=2.4.0",
|
|
63
63
|
"typescript": "^5.9.3"
|
|
64
64
|
},
|
|
65
65
|
"dependencies": {
|