@abaplint/transpiler-cli 2.7.77 → 2.7.79
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/bundle.js +26 -13
- package/package.json +4 -4
package/build/bundle.js
CHANGED
|
@@ -6007,7 +6007,8 @@ class SimpleTarget extends combi_1.Expression {
|
|
|
6007
6007
|
const clas = (0, combi_1.seq)(_1.ClassName, (0, combi_1.tok)(tokens_1.StaticArrow), attribute_name_1.AttributeName);
|
|
6008
6008
|
const start = (0, combi_1.altPrio)(cast, clas, _1.TargetField, _1.TargetFieldSymbol);
|
|
6009
6009
|
const fields = (0, combi_1.seq)((0, combi_1.optPrio)(_1.FieldOffset), (0, combi_1.optPrio)(_1.FieldLength));
|
|
6010
|
-
|
|
6010
|
+
const optional = (0, combi_1.altPrio)(_1.TableBody, fields);
|
|
6011
|
+
return (0, combi_1.seq)(start, something, optional);
|
|
6011
6012
|
}
|
|
6012
6013
|
}
|
|
6013
6014
|
exports.SimpleTarget = SimpleTarget;
|
|
@@ -6360,7 +6361,7 @@ exports.SQLCompareOperator = void 0;
|
|
|
6360
6361
|
const combi_1 = __webpack_require__(/*! ../combi */ "./node_modules/@abaplint/core/build/src/abap/2_statements/combi.js");
|
|
6361
6362
|
class SQLCompareOperator extends combi_1.Expression {
|
|
6362
6363
|
getRunnable() {
|
|
6363
|
-
const operator = (0, combi_1.altPrio)("=", "<>", "<", ">", "<=", ">=", "EQ", "NE", "GE", "GT", "LT", "LE", "><", "=>");
|
|
6364
|
+
const operator = (0, combi_1.altPrio)("=", "<>", "<", ">", "<=", ">=", "EQ", "NE", "GE", "GT", "LT", "LE", "><", "=>", "=<");
|
|
6364
6365
|
return operator;
|
|
6365
6366
|
}
|
|
6366
6367
|
}
|
|
@@ -13058,7 +13059,9 @@ class MoveCorresponding {
|
|
|
13058
13059
|
getMatcher() {
|
|
13059
13060
|
const keeping = (0, combi_1.ver)(version_1.Version.v740sp05, "KEEPING TARGET LINES");
|
|
13060
13061
|
const expanding = (0, combi_1.ver)(version_1.Version.v740sp05, "EXPANDING NESTED TABLES");
|
|
13061
|
-
const move = (0, combi_1.seq)("MOVE-CORRESPONDING", (0, combi_1.optPrio)("EXACT"), expressions_1.Source, "TO",
|
|
13062
|
+
const move = (0, combi_1.seq)("MOVE-CORRESPONDING", (0, combi_1.optPrio)("EXACT"), expressions_1.Source, "TO",
|
|
13063
|
+
// inline defintions not possible in this position,
|
|
13064
|
+
expressions_1.SimpleTarget, (0, combi_1.optPrio)(expanding), (0, combi_1.optPrio)(keeping));
|
|
13062
13065
|
return move;
|
|
13063
13066
|
}
|
|
13064
13067
|
}
|
|
@@ -23223,6 +23226,9 @@ class InlineData {
|
|
|
23223
23226
|
var _a;
|
|
23224
23227
|
const token = (_a = node.findFirstExpression(Expressions.TargetField)) === null || _a === void 0 ? void 0 : _a.getFirstToken();
|
|
23225
23228
|
if (token && type) {
|
|
23229
|
+
if (type instanceof basic_1.CSequenceType) {
|
|
23230
|
+
type = basic_1.StringType.get();
|
|
23231
|
+
}
|
|
23226
23232
|
const identifier = new _typed_identifier_1.TypedIdentifier(token, filename, type, ["inline" /* IdentifierMeta.InlineDefinition */]);
|
|
23227
23233
|
scope.addIdentifier(identifier);
|
|
23228
23234
|
scope.addReference(token, identifier, _reference_1.ReferenceType.DataWriteReference, filename);
|
|
@@ -27336,7 +27342,7 @@ class Data {
|
|
|
27336
27342
|
const id = new data_definition_1.DataDefinition().runSyntax(dd, scope, filename);
|
|
27337
27343
|
if ((id === null || id === void 0 ? void 0 : id.getType().isGeneric()) === true
|
|
27338
27344
|
&& (id === null || id === void 0 ? void 0 : id.getType().containsVoid()) === false) {
|
|
27339
|
-
throw new Error("DATA definition cannot be generic, " + name);
|
|
27345
|
+
throw new Error("DATA definition cannot be generic, " + (name === null || name === void 0 ? void 0 : name.concatTokens()));
|
|
27340
27346
|
}
|
|
27341
27347
|
return id;
|
|
27342
27348
|
}
|
|
@@ -28959,7 +28965,7 @@ const basic_1 = __webpack_require__(/*! ../../types/basic */ "./node_modules/@ab
|
|
|
28959
28965
|
class MoveCorresponding {
|
|
28960
28966
|
runSyntax(node, scope, filename) {
|
|
28961
28967
|
const s = node.findDirectExpression(Expressions.Source);
|
|
28962
|
-
const t = node.findDirectExpression(Expressions.
|
|
28968
|
+
const t = node.findDirectExpression(Expressions.SimpleTarget);
|
|
28963
28969
|
if (s === undefined || t === undefined) {
|
|
28964
28970
|
throw new Error("MoveCorresponding, source or target not found");
|
|
28965
28971
|
}
|
|
@@ -47786,7 +47792,7 @@ class Registry {
|
|
|
47786
47792
|
}
|
|
47787
47793
|
static abaplintVersion() {
|
|
47788
47794
|
// magic, see build script "version.sh"
|
|
47789
|
-
return "2.102.
|
|
47795
|
+
return "2.102.28";
|
|
47790
47796
|
}
|
|
47791
47797
|
getDDICReferences() {
|
|
47792
47798
|
return this.ddicReferences;
|
|
@@ -52685,7 +52691,7 @@ Make sure to test the downported code, it might not always be completely correct
|
|
|
52685
52691
|
}
|
|
52686
52692
|
}
|
|
52687
52693
|
}
|
|
52688
|
-
if (ret.length === 0 && lowFile.getRaw().includes(" xsdbool(
|
|
52694
|
+
if (ret.length === 0 && lowFile.getRaw().includes(" xsdbool(")) {
|
|
52689
52695
|
for (let i = 0; i < lowStatements.length; i++) {
|
|
52690
52696
|
const high = highStatements[i];
|
|
52691
52697
|
const issue = this.replaceXsdBool(high, lowFile, highSyntax);
|
|
@@ -52869,7 +52875,7 @@ Make sure to test the downported code, it might not always be completely correct
|
|
|
52869
52875
|
if (found) {
|
|
52870
52876
|
return found;
|
|
52871
52877
|
}
|
|
52872
|
-
found = this.outlineDataSimple(high, lowFile);
|
|
52878
|
+
found = this.outlineDataSimple(high, lowFile, highSyntax);
|
|
52873
52879
|
if (found) {
|
|
52874
52880
|
return found;
|
|
52875
52881
|
}
|
|
@@ -53413,8 +53419,7 @@ ${indentation}CATCH ${className} INTO ${targetName}.`;
|
|
|
53413
53419
|
const fix = edit_helper_1.EditHelper.merge(fix2, fix1);
|
|
53414
53420
|
return issue_1.Issue.atToken(lowFile, node.getFirstToken(), "Outline DATA", this.getMetadata().key, this.conf.severity, fix);
|
|
53415
53421
|
}
|
|
53416
|
-
outlineDataSimple(node, lowFile) {
|
|
53417
|
-
// outlines "DATA(ls_msg) = temp1.", note that this does not need to look at types
|
|
53422
|
+
outlineDataSimple(node, lowFile, highSyntax) {
|
|
53418
53423
|
var _a, _b, _c;
|
|
53419
53424
|
if (!(node.get() instanceof Statements.Move)) {
|
|
53420
53425
|
return undefined;
|
|
@@ -53453,6 +53458,13 @@ ${indentation}CATCH ${className} INTO ${targetName}.`;
|
|
|
53453
53458
|
}
|
|
53454
53459
|
}
|
|
53455
53460
|
else {
|
|
53461
|
+
const spag = highSyntax.spaghetti.lookupPosition(source.getFirstToken().getStart(), lowFile.getFilename());
|
|
53462
|
+
if (spag) {
|
|
53463
|
+
const found = spag.findVariable(source.concatTokens());
|
|
53464
|
+
if (found && found.getType().isGeneric() === true) {
|
|
53465
|
+
return undefined;
|
|
53466
|
+
}
|
|
53467
|
+
}
|
|
53456
53468
|
type = source.concatTokens();
|
|
53457
53469
|
}
|
|
53458
53470
|
const targetName = (_c = target.findFirstExpression(Expressions.TargetField)) === null || _c === void 0 ? void 0 : _c.concatTokens();
|
|
@@ -53627,7 +53639,7 @@ ${indentation}CREATE OBJECT ${uniqueName2} EXPORTING textid = ${uniqueName1}.\n`
|
|
|
53627
53639
|
return undefined;
|
|
53628
53640
|
}
|
|
53629
53641
|
const sourceRef = (_a = high.findFirstExpression(Expressions.Source)) === null || _a === void 0 ? void 0 : _a.findFirstExpression(Expressions.CorrespondingBody);
|
|
53630
|
-
if ((sourceRef === null || sourceRef === void 0 ? void 0 : sourceRef.getChildren().length) === 1) {
|
|
53642
|
+
if ((sourceRef === null || sourceRef === void 0 ? void 0 : sourceRef.getChildren().length) === 1 && target.concatTokens().toUpperCase().startsWith("DATA(") === false) {
|
|
53631
53643
|
const code = `MOVE-CORRESPONDING ${sourceRef.concatTokens()} TO ${target.concatTokens()}`;
|
|
53632
53644
|
const start = high.getFirstToken().getStart();
|
|
53633
53645
|
const end = high.getLastToken().getStart();
|
|
@@ -77298,9 +77310,10 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
|
77298
77310
|
exports.MoveCorrespondingTranspiler = void 0;
|
|
77299
77311
|
const abaplint = __webpack_require__(/*! @abaplint/core */ "./node_modules/@abaplint/core/build/src/index.js");
|
|
77300
77312
|
const chunk_1 = __webpack_require__(/*! ../chunk */ "./node_modules/@abaplint/transpiler/build/src/chunk.js");
|
|
77313
|
+
const expressions_1 = __webpack_require__(/*! ../expressions */ "./node_modules/@abaplint/transpiler/build/src/expressions/index.js");
|
|
77301
77314
|
class MoveCorrespondingTranspiler {
|
|
77302
77315
|
transpile(node, traversal) {
|
|
77303
|
-
const target =
|
|
77316
|
+
const target = new expressions_1.TargetTranspiler().transpile(node.findDirectExpression(abaplint.Expressions.SimpleTarget), traversal);
|
|
77304
77317
|
const source = traversal.traverse(node.findDirectExpression(abaplint.Expressions.Source));
|
|
77305
77318
|
return new chunk_1.Chunk().append("abap.statements.moveCorresponding(", node, traversal)
|
|
77306
77319
|
.join([source, target])
|
|
@@ -78097,7 +78110,7 @@ class SelectTranspiler {
|
|
|
78097
78110
|
for await (const ${unique} of abap.statements.loop(${faeTranspiled})) {
|
|
78098
78111
|
await abap.statements.select(${target}, {select: "${select.trim()}"${extra}}, {appending: true});
|
|
78099
78112
|
}
|
|
78100
|
-
if (!(${target} instanceof abap.types.HashedTable)) {
|
|
78113
|
+
if (!(${target} instanceof abap.types.HashedTable) && ${target}.getOptions()?.primaryKey?.type !== "SORTED") {
|
|
78101
78114
|
abap.statements.sort(${target}, {by: ${by}.map(k => { return {component: k}; })});
|
|
78102
78115
|
await abap.statements.deleteInternal(${target}, {adjacent: true, by: ${by}});
|
|
78103
78116
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abaplint/transpiler-cli",
|
|
3
|
-
"version": "2.7.
|
|
3
|
+
"version": "2.7.79",
|
|
4
4
|
"description": "Transpiler - Command Line Interface",
|
|
5
5
|
"funding": "https://github.com/sponsors/larshp",
|
|
6
6
|
"bin": {
|
|
@@ -26,12 +26,12 @@
|
|
|
26
26
|
"author": "abaplint",
|
|
27
27
|
"license": "MIT",
|
|
28
28
|
"devDependencies": {
|
|
29
|
-
"@abaplint/transpiler": "^2.7.
|
|
29
|
+
"@abaplint/transpiler": "^2.7.79",
|
|
30
30
|
"@types/glob": "^7.2.0",
|
|
31
31
|
"glob": "=7.2.0",
|
|
32
32
|
"@types/progress": "^2.0.5",
|
|
33
|
-
"@types/node": "^20.5.
|
|
34
|
-
"@abaplint/core": "^2.102.
|
|
33
|
+
"@types/node": "^20.5.4",
|
|
34
|
+
"@abaplint/core": "^2.102.28",
|
|
35
35
|
"progress": "^2.0.3",
|
|
36
36
|
"webpack": "^5.88.2",
|
|
37
37
|
"webpack-cli": "^5.1.4",
|