@abaplint/transpiler-cli 2.11.23 → 2.11.25
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 +118 -18
- package/package.json +3 -3
package/build/bundle.js
CHANGED
|
@@ -3316,7 +3316,7 @@ class Compare extends combi_1.Expression {
|
|
|
3316
3316
|
const between = (0, combi_1.seq)((0, combi_1.optPrio)("NOT"), "BETWEEN", _1.Source, "AND", _1.Source);
|
|
3317
3317
|
// https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-us/abennews-740_sp08-expressions.htm
|
|
3318
3318
|
// but also seems to work in v740sp05, blah
|
|
3319
|
-
const predicate = (0, combi_1.ver)(version_1.Version.v740sp08, _1.MethodCallChain);
|
|
3319
|
+
const predicate = (0, combi_1.ver)(version_1.Version.v740sp08, _1.MethodCallChain, version_1.Version.OpenABAP);
|
|
3320
3320
|
const rett = (0, combi_1.seq)(_1.Source, (0, combi_1.altPrio)((0, combi_1.seq)(_1.CompareOperator, _1.Source), inn, between, sopt));
|
|
3321
3321
|
const fsassign = (0, combi_1.seq)(_1.SourceFieldSymbolChain, "IS", (0, combi_1.optPrio)("NOT"), "ASSIGNED");
|
|
3322
3322
|
const ret = (0, combi_1.seq)((0, combi_1.opt)("NOT"), (0, combi_1.altPrio)(rett, predicate, fsassign));
|
|
@@ -5957,7 +5957,7 @@ class NewObject extends combi_1.Expression {
|
|
|
5957
5957
|
const lines = (0, combi_1.plus)((0, combi_1.seq)((0, combi_1.tok)(tokens_1.WParenLeftW), _1.Source, (0, combi_1.tok)(tokens_1.WParenRightW)));
|
|
5958
5958
|
const linesFields = (0, combi_1.plus)((0, combi_1.seq)((0, combi_1.tok)(tokens_1.WParenLeftW), (0, combi_1.plus)(field_assignment_1.FieldAssignment), (0, combi_1.tok)(tokens_1.WParenRightW)));
|
|
5959
5959
|
const neww = (0, combi_1.seq)("NEW", _1.TypeNameOrInfer, (0, combi_1.tok)(tokens_1.ParenLeftW), (0, combi_1.optPrio)((0, combi_1.alt)(_1.Source, _1.ParameterListS, lines, linesFields)), ")");
|
|
5960
|
-
return (0, combi_1.ver)(version_1.Version.v740sp02, neww);
|
|
5960
|
+
return (0, combi_1.ver)(version_1.Version.v740sp02, neww, version_1.Version.OpenABAP);
|
|
5961
5961
|
}
|
|
5962
5962
|
}
|
|
5963
5963
|
exports.NewObject = NewObject;
|
|
@@ -6786,7 +6786,7 @@ class Source extends combi_1.Expression {
|
|
|
6786
6786
|
// paren used for eg. "( 2 + 1 ) * 4"
|
|
6787
6787
|
const paren = (0, combi_1.seq)((0, combi_1.tok)(tokens_1.WParenLeftW), Source, rparen);
|
|
6788
6788
|
const after = (0, combi_1.seq)((0, combi_1.altPrio)("&", "&&", _1.ArithOperator), Source);
|
|
6789
|
-
const bool = (0, combi_1.seq)((0, combi_1.altPrio)((0, combi_1.ver)(version_1.Version.v702, (0, combi_1.regex)(/^BOOLC$/i)), (0, combi_1.ver)(version_1.Version.v740sp08, (0, combi_1.regex)(/^XSDBOOL$/i))), (0, combi_1.tok)(tokens_1.ParenLeftW), _1.Cond, ")");
|
|
6789
|
+
const bool = (0, combi_1.seq)((0, combi_1.altPrio)((0, combi_1.ver)(version_1.Version.v702, (0, combi_1.regex)(/^BOOLC$/i), version_1.Version.OpenABAP), (0, combi_1.ver)(version_1.Version.v740sp08, (0, combi_1.regex)(/^XSDBOOL$/i), version_1.Version.OpenABAP)), (0, combi_1.tok)(tokens_1.ParenLeftW), _1.Cond, ")");
|
|
6790
6790
|
const prefix = (0, combi_1.altPrio)((0, combi_1.tok)(tokens_1.WPlus), "BIT-NOT");
|
|
6791
6791
|
const old = (0, combi_1.seq)((0, combi_1.optPrio)(prefix), (0, combi_1.altPrio)(_1.Constant, _1.StringTemplate, text_element_1.TextElement, bool, method, (0, combi_1.seq)(_1.FieldChain, deref), paren), (0, combi_1.optPrio)(after));
|
|
6792
6792
|
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)));
|
|
@@ -15086,7 +15086,7 @@ class ReadTable {
|
|
|
15086
15086
|
const using = (0, combi_1.seq)("USING KEY", (0, combi_1.alt)(expressions_1.Field, expressions_1.Dynamic));
|
|
15087
15087
|
const from = (0, combi_1.seq)("FROM", expressions_1.Source);
|
|
15088
15088
|
const perm = (0, combi_1.per)((0, combi_1.alt)(index, key, from), expressions_1.ReadTableTarget, using, comparing, "CASTING", (0, combi_1.seq)("TRANSPORTING", (0, combi_1.altPrio)("ALL FIELDS", "NO FIELDS", transporting_fields_1.TransportingFields)), "BINARY SEARCH");
|
|
15089
|
-
return (0, combi_1.seq)("READ TABLE", (0, combi_1.alt)(expressions_1.SimpleSource2, (0, combi_1.ver)(version_1.Version.v740sp02, expressions_1.Source)), (0, combi_1.opt)(perm));
|
|
15089
|
+
return (0, combi_1.seq)("READ TABLE", (0, combi_1.alt)(expressions_1.SimpleSource2, (0, combi_1.ver)(version_1.Version.v740sp02, expressions_1.Source, version_1.Version.OpenABAP)), (0, combi_1.opt)(perm));
|
|
15090
15090
|
}
|
|
15091
15091
|
}
|
|
15092
15092
|
exports.ReadTable = ReadTable;
|
|
@@ -19939,7 +19939,7 @@ class BuiltIn {
|
|
|
19939
19939
|
constructor() {
|
|
19940
19940
|
this.row = 1;
|
|
19941
19941
|
}
|
|
19942
|
-
buildDefinition(method, name) {
|
|
19942
|
+
static buildDefinition(method, name) {
|
|
19943
19943
|
if (method.cache) {
|
|
19944
19944
|
return method.cache;
|
|
19945
19945
|
}
|
|
@@ -19948,7 +19948,7 @@ class BuiltIn {
|
|
|
19948
19948
|
method.cache = result;
|
|
19949
19949
|
return result;
|
|
19950
19950
|
}
|
|
19951
|
-
searchBuiltin(name) {
|
|
19951
|
+
static searchBuiltin(name) {
|
|
19952
19952
|
if (name === undefined) {
|
|
19953
19953
|
return undefined;
|
|
19954
19954
|
}
|
|
@@ -19958,7 +19958,7 @@ class BuiltIn {
|
|
|
19958
19958
|
}
|
|
19959
19959
|
return this.buildDefinition(def, name);
|
|
19960
19960
|
}
|
|
19961
|
-
isPredicate(name) {
|
|
19961
|
+
static isPredicate(name) {
|
|
19962
19962
|
if (name === undefined) {
|
|
19963
19963
|
return undefined;
|
|
19964
19964
|
}
|
|
@@ -25584,7 +25584,7 @@ class MethodCallChain {
|
|
|
25584
25584
|
// eslint-disable-next-line prefer-const
|
|
25585
25585
|
let { method, def: foundDef } = helper.searchMethodName(def, methodName);
|
|
25586
25586
|
if (method === undefined && current === first) {
|
|
25587
|
-
method =
|
|
25587
|
+
method = _builtin_1.BuiltIn.searchBuiltin(methodName === null || methodName === void 0 ? void 0 : methodName.toUpperCase());
|
|
25588
25588
|
if (method) {
|
|
25589
25589
|
input.scope.addReference(methodToken, method, _reference_1.ReferenceType.BuiltinMethodReference, input.filename);
|
|
25590
25590
|
}
|
|
@@ -26345,11 +26345,15 @@ const basic_types_1 = __webpack_require__(/*! ../basic_types */ "./node_modules/
|
|
|
26345
26345
|
const _type_utils_1 = __webpack_require__(/*! ../_type_utils */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/_type_utils.js");
|
|
26346
26346
|
const _syntax_input_1 = __webpack_require__(/*! ../_syntax_input */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/_syntax_input.js");
|
|
26347
26347
|
const assert_error_1 = __webpack_require__(/*! ../assert_error */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/assert_error.js");
|
|
26348
|
+
const _typed_identifier_1 = __webpack_require__(/*! ../../types/_typed_identifier */ "./node_modules/@abaplint/core/build/src/abap/types/_typed_identifier.js");
|
|
26348
26349
|
class NewObject {
|
|
26349
26350
|
static runSyntax(node, input, targetType) {
|
|
26350
26351
|
let ret = undefined;
|
|
26351
26352
|
const typeExpr = node.findDirectExpression(Expressions.TypeNameOrInfer);
|
|
26352
26353
|
const typeToken = typeExpr === null || typeExpr === void 0 ? void 0 : typeExpr.getFirstToken();
|
|
26354
|
+
if (typeToken === undefined) {
|
|
26355
|
+
throw new Error("NewObject, child TypeNameOrInfer not found");
|
|
26356
|
+
}
|
|
26353
26357
|
const typeName = typeExpr === null || typeExpr === void 0 ? void 0 : typeExpr.concatTokens();
|
|
26354
26358
|
if (typeName === undefined) {
|
|
26355
26359
|
throw new assert_error_1.AssertError("NewObject, child TypeNameOrInfer not found");
|
|
@@ -26357,7 +26361,8 @@ class NewObject {
|
|
|
26357
26361
|
else if (typeName === "#" && targetType && targetType instanceof basic_1.ObjectReferenceType) {
|
|
26358
26362
|
const clas = input.scope.findClassDefinition(targetType.getIdentifierName());
|
|
26359
26363
|
if (clas) {
|
|
26360
|
-
|
|
26364
|
+
const tid = new _typed_identifier_1.TypedIdentifier(typeToken, input.filename, targetType);
|
|
26365
|
+
input.scope.addReference(typeToken, tid, _reference_1.ReferenceType.InferredType, input.filename);
|
|
26361
26366
|
input.scope.addReference(typeToken, clas, _reference_1.ReferenceType.ConstructorReference, input.filename, { ooName: clas.getName() });
|
|
26362
26367
|
}
|
|
26363
26368
|
else {
|
|
@@ -26993,14 +26998,14 @@ class Source {
|
|
|
26993
26998
|
break;
|
|
26994
26999
|
case "BOOLC":
|
|
26995
27000
|
{
|
|
26996
|
-
const method =
|
|
27001
|
+
const method = _builtin_1.BuiltIn.searchBuiltin(tok);
|
|
26997
27002
|
input.scope.addReference(token, method, _reference_1.ReferenceType.BuiltinMethodReference, input.filename);
|
|
26998
27003
|
cond_1.Cond.runSyntax(node.findDirectExpression(Expressions.Cond), input);
|
|
26999
27004
|
return basic_1.StringType.get();
|
|
27000
27005
|
}
|
|
27001
27006
|
case "XSDBOOL":
|
|
27002
27007
|
{
|
|
27003
|
-
const method =
|
|
27008
|
+
const method = _builtin_1.BuiltIn.searchBuiltin(tok);
|
|
27004
27009
|
input.scope.addReference(token, method, _reference_1.ReferenceType.BuiltinMethodReference, input.filename);
|
|
27005
27010
|
cond_1.Cond.runSyntax(node.findDirectExpression(Expressions.Cond), input);
|
|
27006
27011
|
return new basic_1.CharacterType(1, { qualifiedName: "ABAP_BOOL", ddicName: "ABAP_BOOL" });
|
|
@@ -27245,7 +27250,8 @@ class Source {
|
|
|
27245
27250
|
if (typeName === "#" && inferredType && typeToken) {
|
|
27246
27251
|
const found = basic.lookupQualifiedName(inferredType.getQualifiedName());
|
|
27247
27252
|
if (found) {
|
|
27248
|
-
|
|
27253
|
+
const tid = new _typed_identifier_1.TypedIdentifier(typeToken, input.filename, inferredType);
|
|
27254
|
+
input.scope.addReference(typeToken, tid, _reference_1.ReferenceType.InferredType, input.filename, { foundQualified: true });
|
|
27249
27255
|
}
|
|
27250
27256
|
else if (inferredType instanceof basic_1.ObjectReferenceType) {
|
|
27251
27257
|
const def = input.scope.findObjectDefinition(inferredType.getQualifiedName());
|
|
@@ -43115,7 +43121,7 @@ class LSPLookup {
|
|
|
43115
43121
|
ret += "\n\n" + this.dumpType(ref.resolved);
|
|
43116
43122
|
}
|
|
43117
43123
|
else if (ref.referenceType === _reference_1.ReferenceType.BuiltinMethodReference) {
|
|
43118
|
-
const builtinDef =
|
|
43124
|
+
const builtinDef = _builtin_1.BuiltIn.searchBuiltin((_e = (_d = ref.resolved) === null || _d === void 0 ? void 0 : _d.getName()) === null || _e === void 0 ? void 0 : _e.toUpperCase());
|
|
43119
43125
|
if (builtinDef === undefined) {
|
|
43120
43126
|
return "Error: builtin method signature not found";
|
|
43121
43127
|
}
|
|
@@ -53712,7 +53718,7 @@ class Registry {
|
|
|
53712
53718
|
}
|
|
53713
53719
|
static abaplintVersion() {
|
|
53714
53720
|
// magic, see build script "version.sh"
|
|
53715
|
-
return "2.113.
|
|
53721
|
+
return "2.113.171";
|
|
53716
53722
|
}
|
|
53717
53723
|
getDDICReferences() {
|
|
53718
53724
|
return this.ddicReferences;
|
|
@@ -61578,7 +61584,7 @@ ${indentation} output = ${uniqueName}.\n`;
|
|
|
61578
61584
|
const spag = highSyntax.spaghetti.lookupPosition(high.getFirstToken().getStart(), lowFile.getFilename());
|
|
61579
61585
|
for (const r of (spag === null || spag === void 0 ? void 0 : spag.getData().references) || []) {
|
|
61580
61586
|
if (r.referenceType === _reference_1.ReferenceType.BuiltinMethodReference &&
|
|
61581
|
-
|
|
61587
|
+
_builtin_1.BuiltIn.isPredicate(chain.getFirstToken().getStr().toUpperCase())) {
|
|
61582
61588
|
predicate = true;
|
|
61583
61589
|
break;
|
|
61584
61590
|
}
|
|
@@ -61791,6 +61797,15 @@ ${indentation} output = ${uniqueName}.\n`;
|
|
|
61791
61797
|
cdef = r.resolved;
|
|
61792
61798
|
}
|
|
61793
61799
|
}
|
|
61800
|
+
if (cdef instanceof _typed_identifier_1.TypedIdentifier) {
|
|
61801
|
+
const foo = cdef.getType();
|
|
61802
|
+
if (foo instanceof basic_1.ObjectReferenceType) {
|
|
61803
|
+
cdef = foo.getIdentifier();
|
|
61804
|
+
}
|
|
61805
|
+
else {
|
|
61806
|
+
throw new Error("newParameters, downport, unexpected");
|
|
61807
|
+
}
|
|
61808
|
+
}
|
|
61794
61809
|
if (cdef && cdef.getMethodDefinitions === undefined) {
|
|
61795
61810
|
return undefined; // something wrong
|
|
61796
61811
|
}
|
|
@@ -67352,9 +67367,8 @@ ENDCLASS.`,
|
|
|
67352
67367
|
for (const classDef of file.getInfo().listClassDefinitions()) {
|
|
67353
67368
|
methods = methods.concat(classDef.methods);
|
|
67354
67369
|
}
|
|
67355
|
-
const builtIn = new _builtin_1.BuiltIn();
|
|
67356
67370
|
for (const method of methods) {
|
|
67357
|
-
if (
|
|
67371
|
+
if (_builtin_1.BuiltIn.searchBuiltin(method.name.toUpperCase())) {
|
|
67358
67372
|
const message = `Method name "${method.name}" overwrites built-in SAP function name`;
|
|
67359
67373
|
issues.push(issue_1.Issue.atIdentifier(method.identifier, message, this.getMetadata().key));
|
|
67360
67374
|
}
|
|
@@ -78317,6 +78331,17 @@ class CompareTranspiler {
|
|
|
78317
78331
|
const s2 = traversal.traverse(sources[2]);
|
|
78318
78332
|
return new chunk_1.Chunk().appendString(pre + "abap.compare.between(").join([s0, s1, s2]).appendString(")");
|
|
78319
78333
|
}
|
|
78334
|
+
const chain = node.findDirectExpression(core_1.Expressions.MethodCallChain);
|
|
78335
|
+
if (chain) {
|
|
78336
|
+
const name = chain.getFirstToken().getStr();
|
|
78337
|
+
if (core_1.BuiltIn.isPredicate(name)) {
|
|
78338
|
+
// todo, this is not completely correct if there is a method shadowing the name
|
|
78339
|
+
return new chunk_1.Chunk().appendString(`abap.compare.eq(` + traversal.traverse(chain).getCode() + `, abap.builtin.abap_true)`);
|
|
78340
|
+
}
|
|
78341
|
+
else {
|
|
78342
|
+
return new chunk_1.Chunk().appendString(pre + `abap.compare.initial(${traversal.traverse(chain).getCode()}) === false`);
|
|
78343
|
+
}
|
|
78344
|
+
}
|
|
78320
78345
|
console.dir(sources.length);
|
|
78321
78346
|
console.dir(concat);
|
|
78322
78347
|
return new chunk_1.Chunk("CompareTodo");
|
|
@@ -79301,6 +79326,7 @@ __exportStar(__webpack_require__(/*! ./message_number */ "./node_modules/@abapli
|
|
|
79301
79326
|
__exportStar(__webpack_require__(/*! ./method_call_body */ "./node_modules/@abaplint/transpiler/build/src/expressions/method_call_body.js"), exports);
|
|
79302
79327
|
__exportStar(__webpack_require__(/*! ./method_call_chain */ "./node_modules/@abaplint/transpiler/build/src/expressions/method_call_chain.js"), exports);
|
|
79303
79328
|
__exportStar(__webpack_require__(/*! ./method_call_param */ "./node_modules/@abaplint/transpiler/build/src/expressions/method_call_param.js"), exports);
|
|
79329
|
+
__exportStar(__webpack_require__(/*! ./new_object */ "./node_modules/@abaplint/transpiler/build/src/expressions/new_object.js"), exports);
|
|
79304
79330
|
__exportStar(__webpack_require__(/*! ./method_call */ "./node_modules/@abaplint/transpiler/build/src/expressions/method_call.js"), exports);
|
|
79305
79331
|
__exportStar(__webpack_require__(/*! ./method_parameters */ "./node_modules/@abaplint/transpiler/build/src/expressions/method_parameters.js"), exports);
|
|
79306
79332
|
__exportStar(__webpack_require__(/*! ./method_source */ "./node_modules/@abaplint/transpiler/build/src/expressions/method_source.js"), exports);
|
|
@@ -79508,6 +79534,9 @@ class MethodCallChainTranspiler {
|
|
|
79508
79534
|
else if (c instanceof core_1.Nodes.ExpressionNode && c.get() instanceof core_1.Expressions.FieldChain) {
|
|
79509
79535
|
ret.appendChunk(traversal.traverse(c));
|
|
79510
79536
|
}
|
|
79537
|
+
else if (c instanceof core_1.Nodes.ExpressionNode && c.get() instanceof core_1.Expressions.NewObject) {
|
|
79538
|
+
ret.appendChunk(traversal.traverse(c));
|
|
79539
|
+
}
|
|
79511
79540
|
else if (c instanceof core_1.Nodes.ExpressionNode && c.get() instanceof core_1.Expressions.ClassName) {
|
|
79512
79541
|
ret = new chunk_1.Chunk().append(traversal.lookupClassOrInterface(c.getFirstToken().getStr(), c.getFirstToken()), c, traversal);
|
|
79513
79542
|
}
|
|
@@ -79787,6 +79816,73 @@ exports.MethodSourceTranspiler = MethodSourceTranspiler;
|
|
|
79787
79816
|
|
|
79788
79817
|
/***/ }),
|
|
79789
79818
|
|
|
79819
|
+
/***/ "./node_modules/@abaplint/transpiler/build/src/expressions/new_object.js":
|
|
79820
|
+
/*!*******************************************************************************!*\
|
|
79821
|
+
!*** ./node_modules/@abaplint/transpiler/build/src/expressions/new_object.js ***!
|
|
79822
|
+
\*******************************************************************************/
|
|
79823
|
+
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
79824
|
+
|
|
79825
|
+
"use strict";
|
|
79826
|
+
|
|
79827
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
79828
|
+
exports.NewObjectTranspiler = void 0;
|
|
79829
|
+
const core_1 = __webpack_require__(/*! @abaplint/core */ "./node_modules/@abaplint/core/build/src/index.js");
|
|
79830
|
+
const abaplint = __webpack_require__(/*! @abaplint/core */ "./node_modules/@abaplint/core/build/src/index.js");
|
|
79831
|
+
const chunk_1 = __webpack_require__(/*! ../chunk */ "./node_modules/@abaplint/transpiler/build/src/chunk.js");
|
|
79832
|
+
const type_name_or_infer_1 = __webpack_require__(/*! ./type_name_or_infer */ "./node_modules/@abaplint/transpiler/build/src/expressions/type_name_or_infer.js");
|
|
79833
|
+
const transpile_types_1 = __webpack_require__(/*! ../transpile_types */ "./node_modules/@abaplint/transpiler/build/src/transpile_types.js");
|
|
79834
|
+
class NewObjectTranspiler {
|
|
79835
|
+
transpile(node, traversal) {
|
|
79836
|
+
const ret = new chunk_1.Chunk();
|
|
79837
|
+
const typeNameOrInfer = node.findDirectExpression(core_1.Expressions.TypeNameOrInfer);
|
|
79838
|
+
if (typeNameOrInfer === undefined) {
|
|
79839
|
+
throw new Error("NewObjectTranspiler: TypeNameOrInfer not found");
|
|
79840
|
+
}
|
|
79841
|
+
let para = "";
|
|
79842
|
+
const parameters = node.findFirstExpression(abaplint.Expressions.ParameterListS);
|
|
79843
|
+
if (parameters) {
|
|
79844
|
+
para = traversal.traverse(parameters).getCode();
|
|
79845
|
+
}
|
|
79846
|
+
const type = new type_name_or_infer_1.TypeNameOrInfer().findType(typeNameOrInfer, traversal);
|
|
79847
|
+
if (type instanceof abaplint.BasicTypes.ObjectReferenceType) {
|
|
79848
|
+
if (node.getChildren()[3].get() instanceof abaplint.Expressions.Source) {
|
|
79849
|
+
// single default parameter
|
|
79850
|
+
const scope = traversal.findCurrentScopeByToken(typeNameOrInfer.getFirstToken());
|
|
79851
|
+
const cdef = traversal.findClassDefinition(type.getIdentifierName(), scope);
|
|
79852
|
+
const constr = this.findConstructor(cdef, scope);
|
|
79853
|
+
const pname = constr?.getParameters().getDefaultImporting()?.toLowerCase();
|
|
79854
|
+
para = `{${pname}: ${traversal.traverse(node.getChildren()[3]).getCode()}}`;
|
|
79855
|
+
}
|
|
79856
|
+
const clas = traversal.lookupClassOrInterface(type.getIdentifierName(), node.getFirstToken());
|
|
79857
|
+
ret.appendString(transpile_types_1.TranspileTypes.toType(type) + ".set(await (new " + clas + "()).constructor_(" + para + "))");
|
|
79858
|
+
}
|
|
79859
|
+
else {
|
|
79860
|
+
throw new Error("NewObjectTranspiler: only ObjectReferenceType currently handled, todo");
|
|
79861
|
+
}
|
|
79862
|
+
return ret;
|
|
79863
|
+
}
|
|
79864
|
+
findConstructor(cdef, spag) {
|
|
79865
|
+
let def = cdef;
|
|
79866
|
+
while (def !== undefined) {
|
|
79867
|
+
const method = def?.getMethodDefinitions().getByName("CONSTRUCTOR");
|
|
79868
|
+
if (method) {
|
|
79869
|
+
return method;
|
|
79870
|
+
}
|
|
79871
|
+
const name = def.getSuperClass();
|
|
79872
|
+
if (name) {
|
|
79873
|
+
def = spag?.findClassDefinition(name);
|
|
79874
|
+
}
|
|
79875
|
+
else {
|
|
79876
|
+
return undefined;
|
|
79877
|
+
}
|
|
79878
|
+
}
|
|
79879
|
+
}
|
|
79880
|
+
}
|
|
79881
|
+
exports.NewObjectTranspiler = NewObjectTranspiler;
|
|
79882
|
+
//# sourceMappingURL=new_object.js.map
|
|
79883
|
+
|
|
79884
|
+
/***/ }),
|
|
79885
|
+
|
|
79790
79886
|
/***/ "./node_modules/@abaplint/transpiler/build/src/expressions/parameter_list_s.js":
|
|
79791
79887
|
/*!*************************************************************************************!*\
|
|
79792
79888
|
!*** ./node_modules/@abaplint/transpiler/build/src/expressions/parameter_list_s.js ***!
|
|
@@ -80138,6 +80234,10 @@ class SourceTranspiler {
|
|
|
80138
80234
|
ret.append("abap.builtin.boolc(", c, traversal);
|
|
80139
80235
|
post.append(")", c, traversal);
|
|
80140
80236
|
}
|
|
80237
|
+
else if (c instanceof core_1.Nodes.TokenNodeRegex && c.getFirstToken().getStr().toUpperCase() === "XSDBOOL") {
|
|
80238
|
+
ret.append("abap.builtin.xsdbool(", c, traversal);
|
|
80239
|
+
post.append(")", c, traversal);
|
|
80240
|
+
}
|
|
80141
80241
|
else if (c instanceof core_1.Nodes.TokenNode && c.getFirstToken().getStr().toUpperCase() === "VALUE") {
|
|
80142
80242
|
const typ = node.findDirectExpression(core_1.Expressions.TypeNameOrInfer);
|
|
80143
80243
|
if (typ === undefined) {
|
|
@@ -86937,7 +87037,7 @@ const chunk_1 = __webpack_require__(/*! ../chunk */ "./node_modules/@abaplint/tr
|
|
|
86937
87037
|
class ReadTableTranspiler {
|
|
86938
87038
|
transpile(node, traversal) {
|
|
86939
87039
|
let prefix = "";
|
|
86940
|
-
const s = node.
|
|
87040
|
+
const s = node.getChildren()[2];
|
|
86941
87041
|
const ret = traversal.traverse(s).getCode();
|
|
86942
87042
|
const extra = [];
|
|
86943
87043
|
const index = node.findExpressionAfterToken("INDEX");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abaplint/transpiler-cli",
|
|
3
|
-
"version": "2.11.
|
|
3
|
+
"version": "2.11.25",
|
|
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.171",
|
|
31
|
+
"@abaplint/transpiler": "^2.11.25",
|
|
32
32
|
"@types/glob": "^8.1.0",
|
|
33
33
|
"@types/node": "^24.2.1",
|
|
34
34
|
"@types/progress": "^2.0.7",
|