@abaplint/transpiler-cli 2.11.13 → 2.11.14
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 -5
- package/package.json +3 -3
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.162";
|
|
53694
53694
|
}
|
|
53695
53695
|
getDDICReferences() {
|
|
53696
53696
|
return this.ddicReferences;
|
|
@@ -61276,6 +61276,9 @@ ${indentation} output = ${uniqueName}.\n`;
|
|
|
61276
61276
|
outlineData(node, lowFile, highSyntax) {
|
|
61277
61277
|
// hmm, no guard here, as DATA(SDF) is valid in 702
|
|
61278
61278
|
var _a, _b;
|
|
61279
|
+
if (this.lowReg.getConfig().getVersion() === version_1.Version.OpenABAP) {
|
|
61280
|
+
return undefined;
|
|
61281
|
+
}
|
|
61279
61282
|
for (const i of node.findAllExpressionsRecursive(Expressions.InlineData)) {
|
|
61280
61283
|
const nameToken = (_a = i.findDirectExpression(Expressions.TargetField)) === null || _a === void 0 ? void 0 : _a.getFirstToken();
|
|
61281
61284
|
if (nameToken === undefined) {
|
|
@@ -80951,6 +80954,14 @@ class TargetTranspiler {
|
|
|
80951
80954
|
ret.append(traversal_1.Traversal.prefixVariable(traversal_1.Traversal.escapeNamespace(prefix)), c, traversal);
|
|
80952
80955
|
context = scope?.findVariable(c.getFirstToken().getStr())?.getType();
|
|
80953
80956
|
}
|
|
80957
|
+
else if (c.get() instanceof core_1.Expressions.InlineData && c instanceof core_1.Nodes.ExpressionNode) {
|
|
80958
|
+
const targetField = c.findDirectExpression(core_1.Expressions.TargetField);
|
|
80959
|
+
if (targetField === undefined) {
|
|
80960
|
+
throw new Error("TargetTranspiler: InlineData Target field not found");
|
|
80961
|
+
}
|
|
80962
|
+
ret.append(traversal_1.Traversal.prefixVariable(traversal_1.Traversal.escapeNamespace(targetField?.concatTokens())), c, traversal);
|
|
80963
|
+
context = scope?.findVariable(targetField.getFirstToken().getStr())?.getType();
|
|
80964
|
+
}
|
|
80954
80965
|
else if (c.get() instanceof core_1.Expressions.ClassName) {
|
|
80955
80966
|
const name = traversal.lookupClassOrInterface(c.getFirstToken().getStr(), c.getFirstToken());
|
|
80956
80967
|
ret.append(name, c, traversal);
|
|
@@ -82056,14 +82067,15 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
|
82056
82067
|
exports.InlineDeclarations = void 0;
|
|
82057
82068
|
const abaplint = __webpack_require__(/*! @abaplint/core */ "./node_modules/@abaplint/core/build/src/index.js");
|
|
82058
82069
|
const transpile_types_1 = __webpack_require__(/*! ./transpile_types */ "./node_modules/@abaplint/transpiler/build/src/transpile_types.js");
|
|
82070
|
+
const statements_1 = __webpack_require__(/*! ./statements */ "./node_modules/@abaplint/transpiler/build/src/statements/index.js");
|
|
82059
82071
|
class InlineDeclarations {
|
|
82060
82072
|
static buildDeclarations(node, traversal) {
|
|
82061
|
-
const
|
|
82073
|
+
const inlineDataExpressions = node.findAllExpressionsRecursive(abaplint.Expressions.InlineData);
|
|
82062
82074
|
let result = "";
|
|
82063
|
-
for (const expression of
|
|
82075
|
+
for (const expression of inlineDataExpressions) {
|
|
82064
82076
|
const name = expression.findFirstExpression(abaplint.Expressions.TargetField)?.concatTokens();
|
|
82065
82077
|
if (name === undefined) {
|
|
82066
|
-
throw new Error("InlineDeclarations: no target field found");
|
|
82078
|
+
throw new Error("InlineDeclarations: no target data field found");
|
|
82067
82079
|
}
|
|
82068
82080
|
const scope = traversal.findCurrentScopeByToken(expression.getFirstToken());
|
|
82069
82081
|
const variable = scope?.findVariable(name);
|
|
@@ -82072,6 +82084,15 @@ class InlineDeclarations {
|
|
|
82072
82084
|
}
|
|
82073
82085
|
result += transpile_types_1.TranspileTypes.declare(variable) + "\n";
|
|
82074
82086
|
}
|
|
82087
|
+
// todo: declare DATA and FSes according to when they appear in the code
|
|
82088
|
+
const inlineFieldSymbols = node.findAllExpressionsRecursive(abaplint.Expressions.InlineFS);
|
|
82089
|
+
for (const expression of inlineFieldSymbols) {
|
|
82090
|
+
const target = expression.findFirstExpression(abaplint.Expressions.TargetFieldSymbol);
|
|
82091
|
+
if (target === undefined) {
|
|
82092
|
+
throw new Error("InlineDeclarations: no target fs field found");
|
|
82093
|
+
}
|
|
82094
|
+
result += new statements_1.FieldSymbolTranspiler().transpile(target, traversal).getCode();
|
|
82095
|
+
}
|
|
82075
82096
|
return result;
|
|
82076
82097
|
}
|
|
82077
82098
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abaplint/transpiler-cli",
|
|
3
|
-
"version": "2.11.
|
|
3
|
+
"version": "2.11.14",
|
|
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.162",
|
|
31
|
+
"@abaplint/transpiler": "^2.11.14",
|
|
32
32
|
"@types/glob": "^8.1.0",
|
|
33
33
|
"@types/node": "^24.2.1",
|
|
34
34
|
"@types/progress": "^2.0.7",
|