@abaplint/core 2.82.0 → 2.82.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.
|
@@ -84,7 +84,10 @@ class Lexer {
|
|
|
84
84
|
const col = this.stream.getCol();
|
|
85
85
|
const row = this.stream.getRow();
|
|
86
86
|
let whiteBefore = false;
|
|
87
|
-
|
|
87
|
+
let prev = this.stream.prevChar();
|
|
88
|
+
if (s.length === 2) {
|
|
89
|
+
prev = this.stream.prevPrevChar().substr(0, 1);
|
|
90
|
+
}
|
|
88
91
|
if (prev === " " || prev === "\n" || prev === "\t" || prev === ":") {
|
|
89
92
|
whiteBefore = true;
|
|
90
93
|
}
|
|
@@ -10,7 +10,7 @@ const source_1 = require("./source");
|
|
|
10
10
|
const sql_for_all_entries_1 = require("./sql_for_all_entries");
|
|
11
11
|
const _scope_type_1 = require("../_scope_type");
|
|
12
12
|
class Select {
|
|
13
|
-
runSyntax(node, scope, filename) {
|
|
13
|
+
runSyntax(node, scope, filename, skipImplicitInto = false) {
|
|
14
14
|
var _a, _b;
|
|
15
15
|
const token = node.getFirstToken();
|
|
16
16
|
const from = node.findDirectExpression(Expressions.SQLFrom);
|
|
@@ -30,7 +30,8 @@ class Select {
|
|
|
30
30
|
new target_1.Target().runSyntax(t, scope, filename);
|
|
31
31
|
}
|
|
32
32
|
// check implicit into, the target field is implict equal to the table name
|
|
33
|
-
if (
|
|
33
|
+
if (skipImplicitInto === false
|
|
34
|
+
&& node.findDirectExpression(Expressions.SQLIntoTable) === undefined
|
|
34
35
|
&& node.findDirectExpression(Expressions.SQLIntoStructure) === undefined) {
|
|
35
36
|
const fields = (_a = node.findFirstExpression(Expressions.SQLAggregation)) === null || _a === void 0 ? void 0 : _a.concatTokens();
|
|
36
37
|
const c = new RegExp(/^count\(\s*\*\s*\)$/, "i");
|
|
@@ -5,9 +5,11 @@ const Expressions = require("../../2_statements/expressions");
|
|
|
5
5
|
const select_1 = require("../expressions/select");
|
|
6
6
|
class Select {
|
|
7
7
|
runSyntax(node, scope, filename) {
|
|
8
|
-
const
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
const selects = node.findDirectExpressions(Expressions.Select);
|
|
9
|
+
for (let i = 0; i < selects.length; i++) {
|
|
10
|
+
const last = i === selects.length - 1;
|
|
11
|
+
const s = selects[i];
|
|
12
|
+
new select_1.Select().runSyntax(s, scope, filename, last === false);
|
|
11
13
|
}
|
|
12
14
|
}
|
|
13
15
|
}
|
package/build/src/registry.js
CHANGED
|
@@ -45,7 +45,7 @@ class StaticCallViaInstance extends _abap_rule_1.ABAPRule {
|
|
|
45
45
|
for (const s of staticMethodCalls) {
|
|
46
46
|
if (s.equals(next.getStart())) {
|
|
47
47
|
const message = "Avoid calling static method via instance";
|
|
48
|
-
issue_1.Issue.atToken(file, token, message, this.getMetadata().key);
|
|
48
|
+
issues.push(issue_1.Issue.atToken(file, token, message, this.getMetadata().key));
|
|
49
49
|
break;
|
|
50
50
|
}
|
|
51
51
|
}
|