@abaplint/transpiler-cli 2.11.17 → 2.11.19
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 +27 -7
- package/package.json +4 -4
package/build/bundle.js
CHANGED
|
@@ -6791,7 +6791,7 @@ class Source extends combi_1.Expression {
|
|
|
6791
6791
|
const corr = (0, combi_1.ver)(version_1.Version.v740sp05, (0, combi_1.seq)("CORRESPONDING", _1.TypeNameOrInfer, (0, combi_1.tok)(tokens_1.ParenLeftW), _1.CorrespondingBody, rparen, (0, combi_1.optPrio)(after)));
|
|
6792
6792
|
const conv = (0, combi_1.ver)(version_1.Version.v740sp02, (0, combi_1.seq)("CONV", _1.TypeNameOrInfer, lparenNoSpace, _1.ConvBody, rparenNoSpace, (0, combi_1.optPrio)(after)), version_1.Version.OpenABAP);
|
|
6793
6793
|
const swit = (0, combi_1.ver)(version_1.Version.v740sp02, (0, combi_1.seq)("SWITCH", _1.TypeNameOrInfer, (0, combi_1.tok)(tokens_1.ParenLeftW), _1.SwitchBody, rparenNoSpace, (0, combi_1.optPrio)(after)));
|
|
6794
|
-
const value = (0, combi_1.ver)(version_1.Version.v740sp02, (0, combi_1.seq)("VALUE", _1.TypeNameOrInfer, (0, combi_1.tok)(tokens_1.ParenLeftW), _1.ValueBody, rparenNoSpace, (0, combi_1.optPrio)(after)));
|
|
6794
|
+
const value = (0, combi_1.ver)(version_1.Version.v740sp02, (0, combi_1.seq)("VALUE", _1.TypeNameOrInfer, (0, combi_1.tok)(tokens_1.ParenLeftW), _1.ValueBody, rparenNoSpace, (0, combi_1.optPrio)(after)), version_1.Version.OpenABAP);
|
|
6795
6795
|
const cond = (0, combi_1.ver)(version_1.Version.v740sp02, (0, combi_1.seq)("COND", _1.TypeNameOrInfer, (0, combi_1.tok)(tokens_1.ParenLeftW), _1.CondBody, rparenNoSpace, (0, combi_1.optPrio)(after)));
|
|
6796
6796
|
const reff = (0, combi_1.ver)(version_1.Version.v740sp02, (0, combi_1.seq)("REF", _1.TypeNameOrInfer, (0, combi_1.tok)(tokens_1.ParenLeftW), Source, (0, combi_1.optPrio)("OPTIONAL"), rparen), version_1.Version.OpenABAP);
|
|
6797
6797
|
const exact = (0, combi_1.ver)(version_1.Version.v740sp02, (0, combi_1.seq)("EXACT", _1.TypeNameOrInfer, (0, combi_1.tok)(tokens_1.ParenLeftW), Source, rparen, (0, combi_1.optPrio)(after)));
|
|
@@ -53687,7 +53687,7 @@ class Registry {
|
|
|
53687
53687
|
}
|
|
53688
53688
|
static abaplintVersion() {
|
|
53689
53689
|
// magic, see build script "version.sh"
|
|
53690
|
-
return "2.113.
|
|
53690
|
+
return "2.113.166";
|
|
53691
53691
|
}
|
|
53692
53692
|
getDDICReferences() {
|
|
53693
53693
|
return this.ddicReferences;
|
|
@@ -81177,16 +81177,24 @@ class ValueBodyTranspiler {
|
|
|
81177
81177
|
}
|
|
81178
81178
|
const ret = new chunk_1.Chunk().appendString(new type_name_or_infer_1.TypeNameOrInfer().transpile(typ, traversal).getCode());
|
|
81179
81179
|
const context = new type_name_or_infer_1.TypeNameOrInfer().findType(typ, traversal);
|
|
81180
|
+
const hasLines = body.findDirectExpression(core_1.Expressions.ValueBodyLine) !== undefined;
|
|
81181
|
+
let extraFields = "";
|
|
81180
81182
|
for (const child of body.getChildren()) {
|
|
81181
81183
|
if (child.get() instanceof core_1.Expressions.FieldAssignment && child instanceof core_1.Nodes.ExpressionNode) {
|
|
81182
|
-
|
|
81184
|
+
const transpiled = new field_assignment_1.FieldAssignmentTranspiler().transpile(child, traversal).getCode();
|
|
81185
|
+
if (hasLines === false) {
|
|
81186
|
+
ret.appendString(transpiled);
|
|
81187
|
+
}
|
|
81188
|
+
else {
|
|
81189
|
+
extraFields += transpiled;
|
|
81190
|
+
}
|
|
81183
81191
|
}
|
|
81184
81192
|
else if (child.get() instanceof core_1.Expressions.ValueBodyLine && child instanceof core_1.Nodes.ExpressionNode) {
|
|
81185
81193
|
if (!(context instanceof core_1.BasicTypes.TableType)) {
|
|
81186
81194
|
throw new Error("ValueBodyTranspiler, Expected BasicTypes");
|
|
81187
81195
|
}
|
|
81188
81196
|
const rowType = context.getRowType();
|
|
81189
|
-
ret.appendString(new value_body_line_1.ValueBodyLineTranspiler().transpile(rowType, child, traversal).getCode());
|
|
81197
|
+
ret.appendString(new value_body_line_1.ValueBodyLineTranspiler().transpile(rowType, child, traversal, extraFields).getCode());
|
|
81190
81198
|
}
|
|
81191
81199
|
else {
|
|
81192
81200
|
throw new Error("ValueBodyTranspiler, unknown " + child.get().constructor.name);
|
|
@@ -81214,8 +81222,9 @@ const core_1 = __webpack_require__(/*! @abaplint/core */ "./node_modules/@abapli
|
|
|
81214
81222
|
const chunk_1 = __webpack_require__(/*! ../chunk */ "./node_modules/@abaplint/transpiler/build/src/chunk.js");
|
|
81215
81223
|
const transpile_types_1 = __webpack_require__(/*! ../transpile_types */ "./node_modules/@abaplint/transpiler/build/src/transpile_types.js");
|
|
81216
81224
|
const field_assignment_1 = __webpack_require__(/*! ./field_assignment */ "./node_modules/@abaplint/transpiler/build/src/expressions/field_assignment.js");
|
|
81225
|
+
const source_1 = __webpack_require__(/*! ./source */ "./node_modules/@abaplint/transpiler/build/src/expressions/source.js");
|
|
81217
81226
|
class ValueBodyLineTranspiler {
|
|
81218
|
-
transpile(rowType, line, traversal) {
|
|
81227
|
+
transpile(rowType, line, traversal, extraFields) {
|
|
81219
81228
|
const ret = new chunk_1.Chunk();
|
|
81220
81229
|
ret.appendString(`.appendThis(${transpile_types_1.TranspileTypes.toType(rowType)}`);
|
|
81221
81230
|
for (const child of line.getChildren()) {
|
|
@@ -81226,11 +81235,15 @@ class ValueBodyLineTranspiler {
|
|
|
81226
81235
|
else if (child.get() instanceof core_1.Expressions.FieldAssignment && child instanceof core_1.Nodes.ExpressionNode) {
|
|
81227
81236
|
ret.appendString(new field_assignment_1.FieldAssignmentTranspiler().transpile(child, traversal).getCode());
|
|
81228
81237
|
}
|
|
81238
|
+
else if (child.get() instanceof core_1.Expressions.Source && child instanceof core_1.Nodes.ExpressionNode) {
|
|
81239
|
+
// then its a non structured/ table line kind of thing
|
|
81240
|
+
ret.appendString(".set(" + new source_1.SourceTranspiler().transpile(child, traversal).getCode() + ")");
|
|
81241
|
+
}
|
|
81229
81242
|
else {
|
|
81230
|
-
throw new Error("ValueBodyLineTranspiler, unknown " + child.get().constructor.name);
|
|
81243
|
+
throw new Error("ValueBodyLineTranspiler, unknown " + child.get().constructor.name + " " + line.concatTokens());
|
|
81231
81244
|
}
|
|
81232
81245
|
}
|
|
81233
|
-
ret.appendString(`)`);
|
|
81246
|
+
ret.appendString(extraFields + `)`);
|
|
81234
81247
|
return ret;
|
|
81235
81248
|
}
|
|
81236
81249
|
}
|
|
@@ -90605,6 +90618,13 @@ this.INTERNAL_ID = abap.internalIdCounter++;\n`;
|
|
|
90605
90618
|
if (dtel) {
|
|
90606
90619
|
return dtel.parseType(this.reg);
|
|
90607
90620
|
}
|
|
90621
|
+
if (name.includes("=>")) {
|
|
90622
|
+
const [className, typeName] = name.split("=>");
|
|
90623
|
+
const cls = this.findClassDefinition(className, scope);
|
|
90624
|
+
if (cls) {
|
|
90625
|
+
return cls.getTypeDefinitions().getByName(typeName)?.getType();
|
|
90626
|
+
}
|
|
90627
|
+
}
|
|
90608
90628
|
// todo: yea, well, yea
|
|
90609
90629
|
throw new Error("lookupType, type not found, " + node.concatTokens());
|
|
90610
90630
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abaplint/transpiler-cli",
|
|
3
|
-
"version": "2.11.
|
|
3
|
+
"version": "2.11.19",
|
|
4
4
|
"description": "Transpiler - Command Line Interface",
|
|
5
5
|
"funding": "https://github.com/sponsors/larshp",
|
|
6
6
|
"bin": {
|
|
@@ -27,8 +27,8 @@
|
|
|
27
27
|
"author": "abaplint",
|
|
28
28
|
"license": "MIT",
|
|
29
29
|
"devDependencies": {
|
|
30
|
-
"@abaplint/core": "^2.113.
|
|
31
|
-
"@abaplint/transpiler": "^2.11.
|
|
30
|
+
"@abaplint/core": "^2.113.166",
|
|
31
|
+
"@abaplint/transpiler": "^2.11.19",
|
|
32
32
|
"@types/glob": "^8.1.0",
|
|
33
33
|
"@types/node": "^24.2.1",
|
|
34
34
|
"@types/progress": "^2.0.7",
|
|
@@ -38,6 +38,6 @@
|
|
|
38
38
|
"typescript": "^5.9.2",
|
|
39
39
|
"p-limit": "^3.1.0",
|
|
40
40
|
"webpack-cli": "^6.0.1",
|
|
41
|
-
"webpack": "^5.101.
|
|
41
|
+
"webpack": "^5.101.1"
|
|
42
42
|
}
|
|
43
43
|
}
|