@abaplint/core 2.95.45 → 2.95.47
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 +1 -1
- package/build/src/rules/downport.js +12 -16
- package/package.json +1 -1
package/build/src/registry.js
CHANGED
|
@@ -315,7 +315,12 @@ Only one transformation is applied to a statement at a time, so multiple steps m
|
|
|
315
315
|
if (low.getFirstToken().getStart() instanceof position_1.VirtualPosition) {
|
|
316
316
|
return undefined;
|
|
317
317
|
}
|
|
318
|
-
|
|
318
|
+
// downport XSDBOOL() early, as it is valid 702 syntax
|
|
319
|
+
let found = this.replaceXsdBool(high, lowFile, highSyntax);
|
|
320
|
+
if (found) {
|
|
321
|
+
return found;
|
|
322
|
+
}
|
|
323
|
+
found = this.downportEnum(low, high, lowFile, highSyntax, highFile);
|
|
319
324
|
if (found) {
|
|
320
325
|
return found;
|
|
321
326
|
}
|
|
@@ -457,10 +462,6 @@ Only one transformation is applied to a statement at a time, so multiple steps m
|
|
|
457
462
|
if (found) {
|
|
458
463
|
return found;
|
|
459
464
|
}
|
|
460
|
-
found = this.replaceXsdBool(high, lowFile, highSyntax);
|
|
461
|
-
if (found) {
|
|
462
|
-
return found;
|
|
463
|
-
}
|
|
464
465
|
found = this.replaceLineFunctions(high, lowFile, highSyntax, highFile);
|
|
465
466
|
if (found) {
|
|
466
467
|
return found;
|
|
@@ -1956,7 +1957,7 @@ ${indentation} output = ${topTarget}.`;
|
|
|
1956
1957
|
return undefined;
|
|
1957
1958
|
}
|
|
1958
1959
|
outlineValue(low, high, lowFile, highSyntax) {
|
|
1959
|
-
var _a, _b, _c
|
|
1960
|
+
var _a, _b, _c;
|
|
1960
1961
|
if (!(low.get() instanceof _statement_1.Unknown)) {
|
|
1961
1962
|
return undefined;
|
|
1962
1963
|
}
|
|
@@ -1991,15 +1992,10 @@ ${indentation} output = ${topTarget}.`;
|
|
|
1991
1992
|
let added = false;
|
|
1992
1993
|
let data = "";
|
|
1993
1994
|
let previous = undefined;
|
|
1994
|
-
if ((valueBody === null || valueBody === void 0 ? void 0 : valueBody.findDirectExpression(Expressions.ValueBodyLine)) !== undefined
|
|
1995
|
-
&& (valueBody === null || valueBody === void 0 ? void 0 : valueBody.findDirectExpression(Expressions.For)) === undefined) {
|
|
1996
|
-
structureName = this.uniqueName(firstToken.getStart(), lowFile.getFilename(), highSyntax);
|
|
1997
|
-
data = indentation + `DATA ${structureName} LIKE LINE OF ${uniqueName}.\n`;
|
|
1998
|
-
}
|
|
1999
|
-
else if ((valueBody === null || valueBody === void 0 ? void 0 : valueBody.findDirectExpression(Expressions.ValueBodyLine)) !== undefined
|
|
2000
|
-
&& ((_b = valueBody === null || valueBody === void 0 ? void 0 : valueBody.findDirectExpression(Expressions.For)) === null || _b === void 0 ? void 0 : _b.findDirectTokenByText("GROUPS")) !== undefined) {
|
|
1995
|
+
if ((valueBody === null || valueBody === void 0 ? void 0 : valueBody.findDirectExpression(Expressions.ValueBodyLine)) !== undefined) {
|
|
2001
1996
|
structureName = this.uniqueName(firstToken.getStart(), lowFile.getFilename(), highSyntax);
|
|
2002
|
-
|
|
1997
|
+
const extra = (valueBody === null || valueBody === void 0 ? void 0 : valueBody.findDirectExpression(Expressions.For)) ? " " : "";
|
|
1998
|
+
data = indentation + extra + `DATA ${structureName} LIKE LINE OF ${uniqueName}.\n`;
|
|
2003
1999
|
}
|
|
2004
2000
|
for (const a of (valueBody === null || valueBody === void 0 ? void 0 : valueBody.getChildren()) || []) {
|
|
2005
2001
|
if (a.get() instanceof Expressions.FieldAssignment) {
|
|
@@ -2055,7 +2051,7 @@ ${indentation} output = ${topTarget}.`;
|
|
|
2055
2051
|
}
|
|
2056
2052
|
}
|
|
2057
2053
|
}
|
|
2058
|
-
if (body === "" && ((
|
|
2054
|
+
if (body === "" && ((_b = valueBody === null || valueBody === void 0 ? void 0 : valueBody.getLastChild()) === null || _b === void 0 ? void 0 : _b.getFirstToken().getStr().toUpperCase()) === "OPTIONAL") {
|
|
2059
2055
|
const fieldChain = valueBody.findFirstExpression(Expressions.FieldChain);
|
|
2060
2056
|
const rowName = this.uniqueName(firstToken.getStart(), lowFile.getFilename(), highSyntax);
|
|
2061
2057
|
let tableExpression = undefined;
|
|
@@ -2074,7 +2070,7 @@ ${indentation} output = ${topTarget}.`;
|
|
|
2074
2070
|
}
|
|
2075
2071
|
let condition = "";
|
|
2076
2072
|
if ((tableExpression === null || tableExpression === void 0 ? void 0 : tableExpression.getChildren().length) === 3) {
|
|
2077
|
-
condition = "INDEX " + ((
|
|
2073
|
+
condition = "INDEX " + ((_c = tableExpression === null || tableExpression === void 0 ? void 0 : tableExpression.findDirectExpression(Expressions.Source)) === null || _c === void 0 ? void 0 : _c.concatTokens());
|
|
2078
2074
|
}
|
|
2079
2075
|
else {
|
|
2080
2076
|
condition = "WITH KEY " + (tableExpression === null || tableExpression === void 0 ? void 0 : tableExpression.concatTokens().replace("[ ", "").replace(" ]", ""));
|