@abaplint/core 2.102.25 → 2.102.27
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/sql_compare_operator.js +1 -1
- package/build/src/abap/2_statements/statements/move_corresponding.js +3 -1
- package/build/src/abap/5_syntax/expressions/inline_data.js +3 -0
- package/build/src/abap/5_syntax/statements/data.js +1 -1
- package/build/src/abap/5_syntax/statements/move_corresponding.js +1 -1
- package/build/src/registry.js +1 -1
- package/build/src/rules/downport.js +10 -4
- package/package.json +2 -2
|
@@ -4,7 +4,7 @@ exports.SQLCompareOperator = void 0;
|
|
|
4
4
|
const combi_1 = require("../combi");
|
|
5
5
|
class SQLCompareOperator extends combi_1.Expression {
|
|
6
6
|
getRunnable() {
|
|
7
|
-
const operator = (0, combi_1.altPrio)("=", "<>", "<", ">", "<=", ">=", "EQ", "NE", "GE", "GT", "LT", "LE", "><", "=>");
|
|
7
|
+
const operator = (0, combi_1.altPrio)("=", "<>", "<", ">", "<=", ">=", "EQ", "NE", "GE", "GT", "LT", "LE", "><", "=>", "=<");
|
|
8
8
|
return operator;
|
|
9
9
|
}
|
|
10
10
|
}
|
|
@@ -8,7 +8,9 @@ class MoveCorresponding {
|
|
|
8
8
|
getMatcher() {
|
|
9
9
|
const keeping = (0, combi_1.ver)(version_1.Version.v740sp05, "KEEPING TARGET LINES");
|
|
10
10
|
const expanding = (0, combi_1.ver)(version_1.Version.v740sp05, "EXPANDING NESTED TABLES");
|
|
11
|
-
const move = (0, combi_1.seq)("MOVE-CORRESPONDING", (0, combi_1.optPrio)("EXACT"), expressions_1.Source, "TO",
|
|
11
|
+
const move = (0, combi_1.seq)("MOVE-CORRESPONDING", (0, combi_1.optPrio)("EXACT"), expressions_1.Source, "TO",
|
|
12
|
+
// inline defintions not possible in this position,
|
|
13
|
+
expressions_1.SimpleTarget, (0, combi_1.optPrio)(expanding), (0, combi_1.optPrio)(keeping));
|
|
12
14
|
return move;
|
|
13
15
|
}
|
|
14
16
|
}
|
|
@@ -10,6 +10,9 @@ class InlineData {
|
|
|
10
10
|
var _a;
|
|
11
11
|
const token = (_a = node.findFirstExpression(Expressions.TargetField)) === null || _a === void 0 ? void 0 : _a.getFirstToken();
|
|
12
12
|
if (token && type) {
|
|
13
|
+
if (type instanceof basic_1.CSequenceType) {
|
|
14
|
+
type = basic_1.StringType.get();
|
|
15
|
+
}
|
|
13
16
|
const identifier = new _typed_identifier_1.TypedIdentifier(token, filename, type, ["inline" /* IdentifierMeta.InlineDefinition */]);
|
|
14
17
|
scope.addIdentifier(identifier);
|
|
15
18
|
scope.addReference(token, identifier, _reference_1.ReferenceType.DataWriteReference, filename);
|
|
@@ -13,7 +13,7 @@ class Data {
|
|
|
13
13
|
const id = new data_definition_1.DataDefinition().runSyntax(dd, scope, filename);
|
|
14
14
|
if ((id === null || id === void 0 ? void 0 : id.getType().isGeneric()) === true
|
|
15
15
|
&& (id === null || id === void 0 ? void 0 : id.getType().containsVoid()) === false) {
|
|
16
|
-
throw new Error("DATA definition cannot be generic, " + name);
|
|
16
|
+
throw new Error("DATA definition cannot be generic, " + (name === null || name === void 0 ? void 0 : name.concatTokens()));
|
|
17
17
|
}
|
|
18
18
|
return id;
|
|
19
19
|
}
|
|
@@ -9,7 +9,7 @@ const basic_1 = require("../../types/basic");
|
|
|
9
9
|
class MoveCorresponding {
|
|
10
10
|
runSyntax(node, scope, filename) {
|
|
11
11
|
const s = node.findDirectExpression(Expressions.Source);
|
|
12
|
-
const t = node.findDirectExpression(Expressions.
|
|
12
|
+
const t = node.findDirectExpression(Expressions.SimpleTarget);
|
|
13
13
|
if (s === undefined || t === undefined) {
|
|
14
14
|
throw new Error("MoveCorresponding, source or target not found");
|
|
15
15
|
}
|
package/build/src/registry.js
CHANGED
|
@@ -288,7 +288,7 @@ Make sure to test the downported code, it might not always be completely correct
|
|
|
288
288
|
}
|
|
289
289
|
}
|
|
290
290
|
}
|
|
291
|
-
if (ret.length === 0 && lowFile.getRaw().includes(" xsdbool(
|
|
291
|
+
if (ret.length === 0 && lowFile.getRaw().includes(" xsdbool(")) {
|
|
292
292
|
for (let i = 0; i < lowStatements.length; i++) {
|
|
293
293
|
const high = highStatements[i];
|
|
294
294
|
const issue = this.replaceXsdBool(high, lowFile, highSyntax);
|
|
@@ -472,7 +472,7 @@ Make sure to test the downported code, it might not always be completely correct
|
|
|
472
472
|
if (found) {
|
|
473
473
|
return found;
|
|
474
474
|
}
|
|
475
|
-
found = this.outlineDataSimple(high, lowFile);
|
|
475
|
+
found = this.outlineDataSimple(high, lowFile, highSyntax);
|
|
476
476
|
if (found) {
|
|
477
477
|
return found;
|
|
478
478
|
}
|
|
@@ -1016,8 +1016,7 @@ ${indentation}CATCH ${className} INTO ${targetName}.`;
|
|
|
1016
1016
|
const fix = edit_helper_1.EditHelper.merge(fix2, fix1);
|
|
1017
1017
|
return issue_1.Issue.atToken(lowFile, node.getFirstToken(), "Outline DATA", this.getMetadata().key, this.conf.severity, fix);
|
|
1018
1018
|
}
|
|
1019
|
-
outlineDataSimple(node, lowFile) {
|
|
1020
|
-
// outlines "DATA(ls_msg) = temp1.", note that this does not need to look at types
|
|
1019
|
+
outlineDataSimple(node, lowFile, highSyntax) {
|
|
1021
1020
|
var _a, _b, _c;
|
|
1022
1021
|
if (!(node.get() instanceof Statements.Move)) {
|
|
1023
1022
|
return undefined;
|
|
@@ -1056,6 +1055,13 @@ ${indentation}CATCH ${className} INTO ${targetName}.`;
|
|
|
1056
1055
|
}
|
|
1057
1056
|
}
|
|
1058
1057
|
else {
|
|
1058
|
+
const spag = highSyntax.spaghetti.lookupPosition(source.getFirstToken().getStart(), lowFile.getFilename());
|
|
1059
|
+
if (spag) {
|
|
1060
|
+
const found = spag.findVariable(source.concatTokens());
|
|
1061
|
+
if (found && found.getType().isGeneric() === true) {
|
|
1062
|
+
return undefined;
|
|
1063
|
+
}
|
|
1064
|
+
}
|
|
1059
1065
|
type = source.concatTokens();
|
|
1060
1066
|
}
|
|
1061
1067
|
const targetName = (_c = target.findFirstExpression(Expressions.TargetField)) === null || _c === void 0 ? void 0 : _c.concatTokens();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abaplint/core",
|
|
3
|
-
"version": "2.102.
|
|
3
|
+
"version": "2.102.27",
|
|
4
4
|
"description": "abaplint - Core API",
|
|
5
5
|
"main": "build/src/index.js",
|
|
6
6
|
"typings": "build/abaplint.d.ts",
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
"@microsoft/api-extractor": "^7.36.4",
|
|
54
54
|
"@types/chai": "^4.3.5",
|
|
55
55
|
"@types/mocha": "^10.0.1",
|
|
56
|
-
"@types/node": "^20.5.
|
|
56
|
+
"@types/node": "^20.5.2",
|
|
57
57
|
"chai": "^4.3.7",
|
|
58
58
|
"eslint": "^8.47.0",
|
|
59
59
|
"mocha": "^10.2.0",
|