@abaplint/core 2.85.27 → 2.85.28
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/registry.js
CHANGED
|
@@ -490,6 +490,9 @@ ${indentation}`);
|
|
|
490
490
|
else if (source.findFirstExpression(Expressions.FieldLength)) {
|
|
491
491
|
return undefined;
|
|
492
492
|
}
|
|
493
|
+
else if (source.findFirstExpression(Expressions.TableExpression)) {
|
|
494
|
+
return undefined;
|
|
495
|
+
}
|
|
493
496
|
const targetName = (_c = target.findFirstExpression(Expressions.TargetField)) === null || _c === void 0 ? void 0 : _c.concatTokens();
|
|
494
497
|
const indentation = " ".repeat(node.getFirstToken().getStart().getCol() - 1);
|
|
495
498
|
const firstToken = node.getFirstToken();
|
|
@@ -1147,7 +1150,9 @@ ${indentation} output = ${topTarget}.`;
|
|
|
1147
1150
|
uniqueName(position, filename, highSyntax) {
|
|
1148
1151
|
const spag = highSyntax.spaghetti.lookupPosition(position, filename);
|
|
1149
1152
|
if (spag === undefined) {
|
|
1150
|
-
|
|
1153
|
+
const name = "temprr" + this.counter;
|
|
1154
|
+
this.counter++;
|
|
1155
|
+
return name;
|
|
1151
1156
|
}
|
|
1152
1157
|
while (true) {
|
|
1153
1158
|
const name = "temp" + this.counter;
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ManyParentheses = exports.ManyParenthesesConf = void 0;
|
|
4
4
|
const Expressions = require("../abap/2_statements/expressions");
|
|
5
|
+
const Statements = require("../abap/2_statements/statements");
|
|
5
6
|
const issue_1 = require("../issue");
|
|
6
7
|
const _abap_rule_1 = require("./_abap_rule");
|
|
7
8
|
const _basic_rule_config_1 = require("./_basic_rule_config");
|
|
@@ -64,9 +65,25 @@ ENDIF.
|
|
|
64
65
|
issues.push(issue);
|
|
65
66
|
}
|
|
66
67
|
}
|
|
68
|
+
for (const m of structure.findAllStatements(Statements.Move)) {
|
|
69
|
+
issues.push(...this.analyzeMove(file, m));
|
|
70
|
+
}
|
|
67
71
|
return issues;
|
|
68
72
|
}
|
|
69
73
|
////////////////////
|
|
74
|
+
analyzeMove(file, m) {
|
|
75
|
+
const issues = [];
|
|
76
|
+
const children = m.getChildren();
|
|
77
|
+
const last = children[children.length - 2];
|
|
78
|
+
const lastChildren = last.getChildren();
|
|
79
|
+
if (lastChildren.length === 3
|
|
80
|
+
&& lastChildren[0].getFirstToken().getStr() === "("
|
|
81
|
+
&& lastChildren[2].getFirstToken().getStr() === ")") {
|
|
82
|
+
const issue = issue_1.Issue.atToken(file, last.getFirstToken(), "Too many parentheses", this.getMetadata().key, this.conf.severity);
|
|
83
|
+
issues.push(issue);
|
|
84
|
+
}
|
|
85
|
+
return issues;
|
|
86
|
+
}
|
|
70
87
|
analyze(file, cond) {
|
|
71
88
|
const issues = [];
|
|
72
89
|
let comparator = "";
|