@abaplint/transpiler-cli 2.11.13 → 2.11.15
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/README.md +0 -4
- package/build/bundle.js +37 -6
- package/package.json +3 -3
package/README.md
CHANGED
package/build/bundle.js
CHANGED
|
@@ -5066,7 +5066,7 @@ class InlineFS extends combi_1.Expression {
|
|
|
5066
5066
|
const right = (0, combi_1.tok)(tokens_1.ParenRightW);
|
|
5067
5067
|
const left = (0, combi_1.tok)(tokens_1.ParenLeft);
|
|
5068
5068
|
const fs = (0, combi_1.seq)("FIELD-SYMBOL", left, _1.TargetFieldSymbol, right);
|
|
5069
|
-
return (0, combi_1.ver)(version_1.Version.v740sp02, fs);
|
|
5069
|
+
return (0, combi_1.ver)(version_1.Version.v740sp02, fs, version_1.Version.OpenABAP);
|
|
5070
5070
|
}
|
|
5071
5071
|
}
|
|
5072
5072
|
exports.InlineFS = InlineFS;
|
|
@@ -53690,7 +53690,7 @@ class Registry {
|
|
|
53690
53690
|
}
|
|
53691
53691
|
static abaplintVersion() {
|
|
53692
53692
|
// magic, see build script "version.sh"
|
|
53693
|
-
return "2.113.
|
|
53693
|
+
return "2.113.163";
|
|
53694
53694
|
}
|
|
53695
53695
|
getDDICReferences() {
|
|
53696
53696
|
return this.ddicReferences;
|
|
@@ -59833,6 +59833,9 @@ ${indentation}`);
|
|
|
59833
59833
|
outlineCatchSimple(node, lowFile) {
|
|
59834
59834
|
// outlines "CATCH cx_bcs INTO DATA(lx_bcs_excep).", note that this does not need to look at types
|
|
59835
59835
|
var _a, _b;
|
|
59836
|
+
if (this.lowReg.getConfig().getVersion() === version_1.Version.OpenABAP) {
|
|
59837
|
+
return undefined;
|
|
59838
|
+
}
|
|
59836
59839
|
if (!(node.get() instanceof Statements.Catch)) {
|
|
59837
59840
|
return undefined;
|
|
59838
59841
|
}
|
|
@@ -59879,6 +59882,9 @@ ${indentation}CATCH ${className} INTO ${targetName}.`;
|
|
|
59879
59882
|
if (!(node.get() instanceof Statements.Move)) {
|
|
59880
59883
|
return undefined;
|
|
59881
59884
|
}
|
|
59885
|
+
if (this.lowReg.getConfig().getVersion() === version_1.Version.OpenABAP) {
|
|
59886
|
+
return undefined;
|
|
59887
|
+
}
|
|
59882
59888
|
const target = node.findFirstExpression(Expressions.Target);
|
|
59883
59889
|
if (!(((_a = target === null || target === void 0 ? void 0 : target.getFirstChild()) === null || _a === void 0 ? void 0 : _a.get()) instanceof Expressions.InlineData)) {
|
|
59884
59890
|
return undefined;
|
|
@@ -61276,6 +61282,9 @@ ${indentation} output = ${uniqueName}.\n`;
|
|
|
61276
61282
|
outlineData(node, lowFile, highSyntax) {
|
|
61277
61283
|
// hmm, no guard here, as DATA(SDF) is valid in 702
|
|
61278
61284
|
var _a, _b;
|
|
61285
|
+
if (this.lowReg.getConfig().getVersion() === version_1.Version.OpenABAP) {
|
|
61286
|
+
return undefined;
|
|
61287
|
+
}
|
|
61279
61288
|
for (const i of node.findAllExpressionsRecursive(Expressions.InlineData)) {
|
|
61280
61289
|
const nameToken = (_a = i.findDirectExpression(Expressions.TargetField)) === null || _a === void 0 ? void 0 : _a.getFirstToken();
|
|
61281
61290
|
if (nameToken === undefined) {
|
|
@@ -80951,6 +80960,14 @@ class TargetTranspiler {
|
|
|
80951
80960
|
ret.append(traversal_1.Traversal.prefixVariable(traversal_1.Traversal.escapeNamespace(prefix)), c, traversal);
|
|
80952
80961
|
context = scope?.findVariable(c.getFirstToken().getStr())?.getType();
|
|
80953
80962
|
}
|
|
80963
|
+
else if (c.get() instanceof core_1.Expressions.InlineData && c instanceof core_1.Nodes.ExpressionNode) {
|
|
80964
|
+
const targetField = c.findDirectExpression(core_1.Expressions.TargetField);
|
|
80965
|
+
if (targetField === undefined) {
|
|
80966
|
+
throw new Error("TargetTranspiler: InlineData Target field not found");
|
|
80967
|
+
}
|
|
80968
|
+
ret.append(traversal_1.Traversal.prefixVariable(traversal_1.Traversal.escapeNamespace(targetField?.concatTokens())), c, traversal);
|
|
80969
|
+
context = scope?.findVariable(targetField.getFirstToken().getStr())?.getType();
|
|
80970
|
+
}
|
|
80954
80971
|
else if (c.get() instanceof core_1.Expressions.ClassName) {
|
|
80955
80972
|
const name = traversal.lookupClassOrInterface(c.getFirstToken().getStr(), c.getFirstToken());
|
|
80956
80973
|
ret.append(name, c, traversal);
|
|
@@ -82056,14 +82073,15 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
|
82056
82073
|
exports.InlineDeclarations = void 0;
|
|
82057
82074
|
const abaplint = __webpack_require__(/*! @abaplint/core */ "./node_modules/@abaplint/core/build/src/index.js");
|
|
82058
82075
|
const transpile_types_1 = __webpack_require__(/*! ./transpile_types */ "./node_modules/@abaplint/transpiler/build/src/transpile_types.js");
|
|
82076
|
+
const statements_1 = __webpack_require__(/*! ./statements */ "./node_modules/@abaplint/transpiler/build/src/statements/index.js");
|
|
82059
82077
|
class InlineDeclarations {
|
|
82060
82078
|
static buildDeclarations(node, traversal) {
|
|
82061
|
-
const
|
|
82079
|
+
const inlineDataExpressions = node.findAllExpressionsRecursive(abaplint.Expressions.InlineData);
|
|
82062
82080
|
let result = "";
|
|
82063
|
-
for (const expression of
|
|
82081
|
+
for (const expression of inlineDataExpressions) {
|
|
82064
82082
|
const name = expression.findFirstExpression(abaplint.Expressions.TargetField)?.concatTokens();
|
|
82065
82083
|
if (name === undefined) {
|
|
82066
|
-
throw new Error("InlineDeclarations: no target field found");
|
|
82084
|
+
throw new Error("InlineDeclarations: no target data field found");
|
|
82067
82085
|
}
|
|
82068
82086
|
const scope = traversal.findCurrentScopeByToken(expression.getFirstToken());
|
|
82069
82087
|
const variable = scope?.findVariable(name);
|
|
@@ -82072,6 +82090,15 @@ class InlineDeclarations {
|
|
|
82072
82090
|
}
|
|
82073
82091
|
result += transpile_types_1.TranspileTypes.declare(variable) + "\n";
|
|
82074
82092
|
}
|
|
82093
|
+
// todo: declare DATA and FSes according to when they appear in the code
|
|
82094
|
+
const inlineFieldSymbols = node.findAllExpressionsRecursive(abaplint.Expressions.InlineFS);
|
|
82095
|
+
for (const expression of inlineFieldSymbols) {
|
|
82096
|
+
const target = expression.findFirstExpression(abaplint.Expressions.TargetFieldSymbol);
|
|
82097
|
+
if (target === undefined) {
|
|
82098
|
+
throw new Error("InlineDeclarations: no target fs field found");
|
|
82099
|
+
}
|
|
82100
|
+
result += new statements_1.FieldSymbolTranspiler().transpile(target, traversal).getCode();
|
|
82101
|
+
}
|
|
82075
82102
|
return result;
|
|
82076
82103
|
}
|
|
82077
82104
|
}
|
|
@@ -82512,7 +82539,11 @@ class AssignTranspiler {
|
|
|
82512
82539
|
transpile(node, traversal) {
|
|
82513
82540
|
const assignSource = node.findDirectExpression(abaplint.Expressions.AssignSource);
|
|
82514
82541
|
const sources = assignSource?.findDirectExpressionsMulti([abaplint.Expressions.Source, abaplint.Expressions.SimpleSource3]).map(e => new expressions_1.SourceTranspiler(false).transpile(e, traversal).getCode()) || [];
|
|
82515
|
-
|
|
82542
|
+
let fsTarget = node.findDirectExpression(abaplint.Expressions.FSTarget);
|
|
82543
|
+
if (fsTarget?.getFirstChild()?.get() instanceof abaplint.Expressions.InlineFS) {
|
|
82544
|
+
fsTarget = fsTarget.findFirstExpression(abaplint.Expressions.TargetFieldSymbol);
|
|
82545
|
+
}
|
|
82546
|
+
const fs = new expressions_1.FieldSymbolTranspiler().transpile(fsTarget, traversal).getCode();
|
|
82516
82547
|
const options = [];
|
|
82517
82548
|
const concat = node.concatTokens().toUpperCase();
|
|
82518
82549
|
if (concat.startsWith("ASSIGN COMPONENT ")) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abaplint/transpiler-cli",
|
|
3
|
-
"version": "2.11.
|
|
3
|
+
"version": "2.11.15",
|
|
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.163",
|
|
31
|
+
"@abaplint/transpiler": "^2.11.15",
|
|
32
32
|
"@types/glob": "^8.1.0",
|
|
33
33
|
"@types/node": "^24.2.1",
|
|
34
34
|
"@types/progress": "^2.0.7",
|