@abaplint/transpiler-cli 2.12.7 → 2.12.9
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 +22 -5
- package/package.json +3 -3
package/build/bundle.js
CHANGED
|
@@ -25419,11 +25419,19 @@ class InlineData {
|
|
|
25419
25419
|
if (type instanceof basic_1.CSequenceType || type instanceof basic_1.CLikeType) {
|
|
25420
25420
|
type = basic_1.StringType.get();
|
|
25421
25421
|
}
|
|
25422
|
+
else if (type instanceof basic_1.XSequenceType) {
|
|
25423
|
+
type = basic_1.StringType.get();
|
|
25424
|
+
}
|
|
25422
25425
|
else if (type instanceof basic_1.CGenericType) {
|
|
25423
25426
|
const message = "InlineData, generic type C cannot be used for inferred type";
|
|
25424
25427
|
input.issues.push((0, _syntax_input_1.syntaxIssue)(input, node.getFirstToken(), message));
|
|
25425
25428
|
return;
|
|
25426
25429
|
}
|
|
25430
|
+
if (type.isGeneric()) {
|
|
25431
|
+
const message = "DATA definition cannot be generic, " + type.constructor.name;
|
|
25432
|
+
input.issues.push((0, _syntax_input_1.syntaxIssue)(input, node.getFirstToken(), message));
|
|
25433
|
+
type = basic_1.VoidType.get(_syntax_input_1.CheckSyntaxKey);
|
|
25434
|
+
}
|
|
25427
25435
|
const identifier = new _typed_identifier_1.TypedIdentifier(token, input.filename, type, ["inline" /* IdentifierMeta.InlineDefinition */]);
|
|
25428
25436
|
input.scope.addIdentifier(identifier);
|
|
25429
25437
|
input.scope.addReference(token, identifier, _reference_1.ReferenceType.DataWriteReference, input.filename);
|
|
@@ -27359,15 +27367,20 @@ class Source {
|
|
|
27359
27367
|
const s = Source.runSyntax(node.findDirectExpression(Expressions.Source), input);
|
|
27360
27368
|
/*
|
|
27361
27369
|
console.dir(node.concatTokens());
|
|
27362
|
-
console.dir(targetType);
|
|
27363
|
-
console.dir(foundType);
|
|
27364
27370
|
console.dir(s);
|
|
27371
|
+
console.dir(foundType);
|
|
27372
|
+
console.dir(targetType);
|
|
27365
27373
|
*/
|
|
27366
27374
|
if (foundType && foundType.isGeneric() && s) {
|
|
27367
27375
|
foundType = new basic_1.DataReference(s);
|
|
27368
27376
|
}
|
|
27369
27377
|
else if (foundType === undefined && s) {
|
|
27370
|
-
|
|
27378
|
+
if (s instanceof basic_1.AnyType) {
|
|
27379
|
+
foundType = new basic_1.DataReference(basic_1.VoidType.get("REF-ANY"));
|
|
27380
|
+
}
|
|
27381
|
+
else {
|
|
27382
|
+
foundType = new basic_1.DataReference(s);
|
|
27383
|
+
}
|
|
27371
27384
|
}
|
|
27372
27385
|
else if (foundType && targetType === undefined) {
|
|
27373
27386
|
foundType = new basic_1.DataReference(foundType);
|
|
@@ -53671,7 +53684,7 @@ class Registry {
|
|
|
53671
53684
|
}
|
|
53672
53685
|
static abaplintVersion() {
|
|
53673
53686
|
// magic, see build script "version.sh"
|
|
53674
|
-
return "2.113.
|
|
53687
|
+
return "2.113.234";
|
|
53675
53688
|
}
|
|
53676
53689
|
getDDICReferences() {
|
|
53677
53690
|
return this.ddicReferences;
|
|
@@ -87918,7 +87931,11 @@ class PerformTranspiler {
|
|
|
87918
87931
|
const name = t.getFirstToken().getStr();
|
|
87919
87932
|
params.push(`"${name}": ` + traversal.traverse(t).getCode());
|
|
87920
87933
|
}
|
|
87921
|
-
|
|
87934
|
+
let call = "await " + ref + `({${params.join(",")}});`;
|
|
87935
|
+
if (node.concatTokens().toUpperCase().includes(" IF FOUND")) {
|
|
87936
|
+
call = `if (${ref} !== undefined) { ${call} }`;
|
|
87937
|
+
}
|
|
87938
|
+
return new chunk_1.Chunk(call);
|
|
87922
87939
|
}
|
|
87923
87940
|
else {
|
|
87924
87941
|
// todo: most of this needs rewriting?
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abaplint/transpiler-cli",
|
|
3
|
-
"version": "2.12.
|
|
3
|
+
"version": "2.12.9",
|
|
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.12.
|
|
30
|
+
"@abaplint/core": "^2.113.234",
|
|
31
|
+
"@abaplint/transpiler": "^2.12.9",
|
|
32
32
|
"@types/glob": "^8.1.0",
|
|
33
33
|
"@types/node": "^24.9.1",
|
|
34
34
|
"@types/progress": "^2.0.7",
|