@abaplint/transpiler-cli 2.11.43 → 2.11.45
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 +68 -34
- package/package.json +3 -3
package/build/bundle.js
CHANGED
|
@@ -14895,7 +14895,7 @@ class Raise {
|
|
|
14895
14895
|
const exporting = (0, combi_1.seq)("EXPORTING", expressions_1.ParameterListS);
|
|
14896
14896
|
const from = (0, combi_1.seq)("TYPE", expressions_1.ClassName, (0, combi_1.opt)((0, combi_1.alt)((0, combi_1.ver)(version_1.Version.v750, (0, combi_1.alt)(mess, messid)), (0, combi_1.ver)(version_1.Version.v752, "USING MESSAGE"))), (0, combi_1.optPrio)(exporting));
|
|
14897
14897
|
const pre = (0, combi_1.altPrio)((0, combi_1.seq)((0, combi_1.optPrio)("RESUMABLE"), "EXCEPTION"), "SHORTDUMP");
|
|
14898
|
-
const clas = (0, combi_1.seq)(pre, (0, combi_1.altPrio)(from, (0, combi_1.ver)(version_1.Version.v752, expressions_1.Source), expressions_1.SimpleSource2));
|
|
14898
|
+
const clas = (0, combi_1.seq)(pre, (0, combi_1.altPrio)(from, (0, combi_1.ver)(version_1.Version.v752, expressions_1.Source, version_1.Version.OpenABAP), expressions_1.SimpleSource2));
|
|
14899
14899
|
const ret = (0, combi_1.seq)("RAISE", (0, combi_1.altPrio)(clas, expressions_1.ExceptionName));
|
|
14900
14900
|
return ret;
|
|
14901
14901
|
}
|
|
@@ -31156,15 +31156,22 @@ const _syntax_input_1 = __webpack_require__(/*! ../_syntax_input */ "./node_modu
|
|
|
31156
31156
|
const assert_error_1 = __webpack_require__(/*! ../assert_error */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/assert_error.js");
|
|
31157
31157
|
class IncludeType {
|
|
31158
31158
|
runSyntax(node, input) {
|
|
31159
|
-
var _a, _b;
|
|
31159
|
+
var _a, _b, _c;
|
|
31160
31160
|
const components = [];
|
|
31161
31161
|
const iname = node.findFirstExpression(Expressions.TypeName);
|
|
31162
31162
|
if (iname === undefined) {
|
|
31163
31163
|
throw new assert_error_1.AssertError("IncludeType, unexpected node structure");
|
|
31164
31164
|
}
|
|
31165
31165
|
const name = iname.getFirstToken().getStr();
|
|
31166
|
+
const isStructure = node.findDirectTokenByText("STRUCTURE") !== undefined;
|
|
31166
31167
|
let ityp = new basic_types_1.BasicTypes(input).parseType(iname);
|
|
31167
|
-
|
|
31168
|
+
if (ityp instanceof basic_1.VoidType && isStructure) {
|
|
31169
|
+
const found = (_a = input.scope.findVariable(name)) === null || _a === void 0 ? void 0 : _a.getType();
|
|
31170
|
+
if (found) {
|
|
31171
|
+
ityp = found;
|
|
31172
|
+
}
|
|
31173
|
+
}
|
|
31174
|
+
const as = (_b = node.findExpressionAfterToken("AS")) === null || _b === void 0 ? void 0 : _b.concatTokens();
|
|
31168
31175
|
if (as && ityp instanceof basic_1.StructureType) {
|
|
31169
31176
|
ityp = new basic_1.StructureType(ityp.getComponents().concat([{
|
|
31170
31177
|
name: as,
|
|
@@ -31172,7 +31179,18 @@ class IncludeType {
|
|
|
31172
31179
|
asInclude: true,
|
|
31173
31180
|
}]));
|
|
31174
31181
|
}
|
|
31175
|
-
|
|
31182
|
+
else if (ityp instanceof basic_1.TableType && isStructure) {
|
|
31183
|
+
ityp = ityp.getRowType();
|
|
31184
|
+
}
|
|
31185
|
+
else if (ityp instanceof basic_1.VoidType) {
|
|
31186
|
+
return ityp;
|
|
31187
|
+
}
|
|
31188
|
+
if (!(ityp instanceof basic_1.StructureType)) {
|
|
31189
|
+
const message = "not structured, " + name;
|
|
31190
|
+
input.issues.push((0, _syntax_input_1.syntaxIssue)(input, iname.getFirstToken(), message));
|
|
31191
|
+
return basic_1.VoidType.get(_syntax_input_1.CheckSyntaxKey);
|
|
31192
|
+
}
|
|
31193
|
+
const suffix = (_c = node.findExpressionAfterToken("SUFFIX")) === null || _c === void 0 ? void 0 : _c.concatTokens();
|
|
31176
31194
|
if (suffix && ityp instanceof basic_1.StructureType) {
|
|
31177
31195
|
const components = [];
|
|
31178
31196
|
for (const c of ityp.getComponents()) {
|
|
@@ -34132,9 +34150,7 @@ exports.Constants = Constants;
|
|
|
34132
34150
|
|
|
34133
34151
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
34134
34152
|
exports.Data = void 0;
|
|
34135
|
-
const _syntax_input_1 = __webpack_require__(/*! ../_syntax_input */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/_syntax_input.js");
|
|
34136
34153
|
const data_1 = __webpack_require__(/*! ../statements/data */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/data.js");
|
|
34137
|
-
const _reference_1 = __webpack_require__(/*! ../_reference */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/_reference.js");
|
|
34138
34154
|
const nodes_1 = __webpack_require__(/*! ../../nodes */ "./node_modules/@abaplint/core/build/src/abap/nodes/index.js");
|
|
34139
34155
|
const type_1 = __webpack_require__(/*! ../statements/type */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/type.js");
|
|
34140
34156
|
const _typed_identifier_1 = __webpack_require__(/*! ../../types/_typed_identifier */ "./node_modules/@abaplint/core/build/src/abap/types/_typed_identifier.js");
|
|
@@ -34143,9 +34159,10 @@ const Basic = __webpack_require__(/*! ../../types/basic */ "./node_modules/@abap
|
|
|
34143
34159
|
const Expressions = __webpack_require__(/*! ../../2_statements/expressions */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js");
|
|
34144
34160
|
const Statements = __webpack_require__(/*! ../../2_statements/statements */ "./node_modules/@abaplint/core/build/src/abap/2_statements/statements/index.js");
|
|
34145
34161
|
const Structures = __webpack_require__(/*! ../../3_structures/structures */ "./node_modules/@abaplint/core/build/src/abap/3_structures/structures/index.js");
|
|
34162
|
+
const include_type_1 = __webpack_require__(/*! ../statements/include_type */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/include_type.js");
|
|
34146
34163
|
class Data {
|
|
34147
34164
|
static runSyntax(node, input) {
|
|
34148
|
-
var _a
|
|
34165
|
+
var _a;
|
|
34149
34166
|
const fouth = (_a = node.getFirstChild()) === null || _a === void 0 ? void 0 : _a.getChildren()[3];
|
|
34150
34167
|
const isCommonPart = fouth instanceof nodes_1.TokenNode && fouth.concatTokens() === "COMMON";
|
|
34151
34168
|
if (isCommonPart) {
|
|
@@ -34180,25 +34197,47 @@ class Data {
|
|
|
34180
34197
|
}
|
|
34181
34198
|
else if (c instanceof nodes_1.StatementNode && ctyp instanceof Statements.IncludeType) {
|
|
34182
34199
|
// INCLUDES
|
|
34183
|
-
|
|
34184
|
-
const
|
|
34200
|
+
/*
|
|
34201
|
+
const typeToken = c.findFirstExpression(Expressions.TypeName)?.getFirstToken();
|
|
34202
|
+
const typeName = typeToken?.getStr();
|
|
34203
|
+
|
|
34185
34204
|
let foundId = input.scope.findType(typeName);
|
|
34186
34205
|
if (foundId === undefined) {
|
|
34187
|
-
|
|
34206
|
+
foundId = input.scope.findVariable(typeName);
|
|
34188
34207
|
}
|
|
34189
|
-
|
|
34208
|
+
|
|
34209
|
+
let found = foundId?.getType();
|
|
34190
34210
|
if (found === undefined) {
|
|
34191
|
-
|
|
34192
|
-
|
|
34193
|
-
|
|
34194
|
-
|
|
34195
|
-
|
|
34196
|
-
|
|
34197
|
-
|
|
34211
|
+
const f = input.scope.getDDIC().lookupTableOrView(typeName).type;
|
|
34212
|
+
if (f instanceof TypedIdentifier) {
|
|
34213
|
+
found = f.getType();
|
|
34214
|
+
} else {
|
|
34215
|
+
found = f;
|
|
34216
|
+
}
|
|
34217
|
+
} else {
|
|
34218
|
+
input.scope.addReference(typeToken, foundId, ReferenceType.TypeReference, input.filename);
|
|
34198
34219
|
}
|
|
34199
|
-
|
|
34200
|
-
|
|
34220
|
+
if (found instanceof Basic.VoidType) {
|
|
34221
|
+
if (table === true) {
|
|
34222
|
+
const ttyp = new Basic.TableType(found, {withHeader: true, keyType: Basic.TableKeyType.default});
|
|
34223
|
+
return new TypedIdentifier(name, input.filename, ttyp);
|
|
34224
|
+
} else {
|
|
34225
|
+
return new TypedIdentifier(name, input.filename, found);
|
|
34226
|
+
}
|
|
34227
|
+
}
|
|
34228
|
+
if (found instanceof Basic.UnknownType) {
|
|
34229
|
+
return new TypedIdentifier(name, input.filename, new Basic.UnknownType("unknown type, " + typeName));
|
|
34230
|
+
}
|
|
34231
|
+
if (found instanceof Basic.TableType && found.isWithHeader()) {
|
|
34232
|
+
found = found.getRowType();
|
|
34201
34233
|
}
|
|
34234
|
+
if (!(found instanceof Basic.StructureType)) {
|
|
34235
|
+
const message = "not structured, " + typeName;
|
|
34236
|
+
input.issues.push(syntaxIssue(input, typeToken!, message));
|
|
34237
|
+
return new TypedIdentifier(name, input.filename, Basic.VoidType.get(CheckSyntaxKey));
|
|
34238
|
+
}
|
|
34239
|
+
*/
|
|
34240
|
+
const found = new include_type_1.IncludeType().runSyntax(c, input);
|
|
34202
34241
|
if (found instanceof Basic.VoidType) {
|
|
34203
34242
|
if (table === true) {
|
|
34204
34243
|
const ttyp = new Basic.TableType(found, { withHeader: true, keyType: Basic.TableKeyType.default });
|
|
@@ -34208,18 +34247,7 @@ class Data {
|
|
|
34208
34247
|
return new _typed_identifier_1.TypedIdentifier(name, input.filename, found);
|
|
34209
34248
|
}
|
|
34210
34249
|
}
|
|
34211
|
-
|
|
34212
|
-
return new _typed_identifier_1.TypedIdentifier(name, input.filename, new Basic.UnknownType("unknown type, " + typeName));
|
|
34213
|
-
}
|
|
34214
|
-
if (found instanceof Basic.TableType && found.isWithHeader()) {
|
|
34215
|
-
found = found.getRowType();
|
|
34216
|
-
}
|
|
34217
|
-
if (!(found instanceof Basic.StructureType)) {
|
|
34218
|
-
const message = "not structured, " + typeName;
|
|
34219
|
-
input.issues.push((0, _syntax_input_1.syntaxIssue)(input, typeToken, message));
|
|
34220
|
-
return new _typed_identifier_1.TypedIdentifier(name, input.filename, Basic.VoidType.get(_syntax_input_1.CheckSyntaxKey));
|
|
34221
|
-
}
|
|
34222
|
-
for (const c of found.getComponents()) {
|
|
34250
|
+
for (const c of found) {
|
|
34223
34251
|
components.push(c);
|
|
34224
34252
|
}
|
|
34225
34253
|
}
|
|
@@ -53794,7 +53822,7 @@ class Registry {
|
|
|
53794
53822
|
}
|
|
53795
53823
|
static abaplintVersion() {
|
|
53796
53824
|
// magic, see build script "version.sh"
|
|
53797
|
-
return "2.113.
|
|
53825
|
+
return "2.113.183";
|
|
53798
53826
|
}
|
|
53799
53827
|
getDDICReferences() {
|
|
53800
53828
|
return this.ddicReferences;
|
|
@@ -61739,6 +61767,9 @@ ${indentation} output = ${uniqueName}.\n`;
|
|
|
61739
61767
|
}
|
|
61740
61768
|
replaceLineFunctions(node, lowFile, highSyntax, highFile) {
|
|
61741
61769
|
var _a, _b;
|
|
61770
|
+
if (this.lowReg.getConfig().getVersion() === version_1.Version.OpenABAP) {
|
|
61771
|
+
return undefined;
|
|
61772
|
+
}
|
|
61742
61773
|
const spag = highSyntax.spaghetti.lookupPosition(node.getFirstToken().getStart(), lowFile.getFilename());
|
|
61743
61774
|
for (const r of (spag === null || spag === void 0 ? void 0 : spag.getData().references) || []) {
|
|
61744
61775
|
if (r.referenceType !== _reference_1.ReferenceType.BuiltinMethodReference) {
|
|
@@ -87272,7 +87303,10 @@ class RaiseTranspiler {
|
|
|
87272
87303
|
const classNameToken = node.findFirstExpression(abaplint.Expressions.ClassName)?.getFirstToken();
|
|
87273
87304
|
const className = classNameToken?.getStr();
|
|
87274
87305
|
if (className === undefined) {
|
|
87275
|
-
|
|
87306
|
+
let s = node.findFirstExpression(abaplint.Expressions.SimpleSource2);
|
|
87307
|
+
if (s === undefined) {
|
|
87308
|
+
s = node.findFirstExpression(abaplint.Expressions.Source);
|
|
87309
|
+
}
|
|
87276
87310
|
if (s === undefined) {
|
|
87277
87311
|
const name = node.findFirstExpression(abaplint.Expressions.ExceptionName)?.concatTokens().toLowerCase();
|
|
87278
87312
|
return new chunk_1.Chunk().append(`throw new abap.ClassicError({classic: "${name}"});`, node, traversal);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abaplint/transpiler-cli",
|
|
3
|
-
"version": "2.11.
|
|
3
|
+
"version": "2.11.45",
|
|
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.183",
|
|
31
|
+
"@abaplint/transpiler": "^2.11.45",
|
|
32
32
|
"@types/glob": "^8.1.0",
|
|
33
33
|
"@types/node": "^24.3.0",
|
|
34
34
|
"@types/progress": "^2.0.7",
|