@abaplint/transpiler-cli 2.7.74 → 2.7.75
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 +223 -28
- package/package.json +4 -4
package/build/bundle.js
CHANGED
|
@@ -8878,7 +8878,7 @@ const version_1 = __webpack_require__(/*! ../../../version */ "./node_modules/@a
|
|
|
8878
8878
|
const expressions_1 = __webpack_require__(/*! ../expressions */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js");
|
|
8879
8879
|
class CaseType {
|
|
8880
8880
|
getMatcher() {
|
|
8881
|
-
return (0, combi_1.ver)(version_1.Version.v750, (0, combi_1.seq)("CASE TYPE OF", expressions_1.Source));
|
|
8881
|
+
return (0, combi_1.ver)(version_1.Version.v750, (0, combi_1.seq)("CASE TYPE OF", expressions_1.Source), version_1.Version.OpenABAP);
|
|
8882
8882
|
}
|
|
8883
8883
|
}
|
|
8884
8884
|
exports.CaseType = CaseType;
|
|
@@ -15989,9 +15989,9 @@ const expressions_1 = __webpack_require__(/*! ../expressions */ "./node_modules/
|
|
|
15989
15989
|
const version_1 = __webpack_require__(/*! ../../../version */ "./node_modules/@abaplint/core/build/src/version.js");
|
|
15990
15990
|
class WhenType {
|
|
15991
15991
|
getMatcher() {
|
|
15992
|
-
const into = (0, combi_1.seq)("INTO", expressions_1.
|
|
15992
|
+
const into = (0, combi_1.seq)("INTO", expressions_1.Target);
|
|
15993
15993
|
const type = (0, combi_1.seq)(expressions_1.ClassName, (0, combi_1.optPrio)(into));
|
|
15994
|
-
return (0, combi_1.ver)(version_1.Version.v750, (0, combi_1.seq)("WHEN TYPE", type));
|
|
15994
|
+
return (0, combi_1.ver)(version_1.Version.v750, (0, combi_1.seq)("WHEN TYPE", type), version_1.Version.OpenABAP);
|
|
15995
15995
|
}
|
|
15996
15996
|
}
|
|
15997
15997
|
exports.WhenType = WhenType;
|
|
@@ -20950,6 +20950,12 @@ class TypeUtils {
|
|
|
20950
20950
|
}
|
|
20951
20951
|
return true;
|
|
20952
20952
|
}
|
|
20953
|
+
else if (target instanceof basic_1.SimpleType) {
|
|
20954
|
+
if (source instanceof basic_1.ObjectReferenceType
|
|
20955
|
+
|| source instanceof basic_1.TableType) {
|
|
20956
|
+
return false;
|
|
20957
|
+
}
|
|
20958
|
+
}
|
|
20953
20959
|
return true;
|
|
20954
20960
|
}
|
|
20955
20961
|
}
|
|
@@ -24881,12 +24887,6 @@ class Source {
|
|
|
24881
24887
|
throw new Error("determineType, child TypeNameOrInfer not found");
|
|
24882
24888
|
}
|
|
24883
24889
|
else if (typeName === "#" && targetType) {
|
|
24884
|
-
// const found = basic.lookupQualifiedName(targetType.getQualifiedName());
|
|
24885
|
-
/*
|
|
24886
|
-
if (found) {
|
|
24887
|
-
scope.addReference(typeToken, found, ReferenceType.InferredType, filename);
|
|
24888
|
-
}
|
|
24889
|
-
*/
|
|
24890
24890
|
return targetType;
|
|
24891
24891
|
}
|
|
24892
24892
|
if (typeName !== "#" && typeToken) {
|
|
@@ -26216,18 +26216,33 @@ exports.Assign = void 0;
|
|
|
26216
26216
|
const Expressions = __webpack_require__(/*! ../../2_statements/expressions */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js");
|
|
26217
26217
|
const source_1 = __webpack_require__(/*! ../expressions/source */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/source.js");
|
|
26218
26218
|
const fstarget_1 = __webpack_require__(/*! ../expressions/fstarget */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/fstarget.js");
|
|
26219
|
-
const dynamic_1 = __webpack_require__(/*! ../expressions/dynamic */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/dynamic.js");
|
|
26220
26219
|
const basic_1 = __webpack_require__(/*! ../../types/basic */ "./node_modules/@abaplint/core/build/src/abap/types/basic/index.js");
|
|
26220
|
+
const dynamic_1 = __webpack_require__(/*! ../expressions/dynamic */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/dynamic.js");
|
|
26221
26221
|
class Assign {
|
|
26222
26222
|
runSyntax(node, scope, filename) {
|
|
26223
|
-
var _a, _b
|
|
26224
|
-
const
|
|
26223
|
+
var _a, _b;
|
|
26224
|
+
const assignSource = node.findDirectExpression(Expressions.AssignSource);
|
|
26225
|
+
const sources = (assignSource === null || assignSource === void 0 ? void 0 : assignSource.findDirectExpressions(Expressions.Source)) || [];
|
|
26225
26226
|
const theSource = sources[sources.length - 1];
|
|
26226
|
-
let sourceType =
|
|
26227
|
-
|
|
26227
|
+
let sourceType = undefined;
|
|
26228
|
+
const firstAssign = assignSource === null || assignSource === void 0 ? void 0 : assignSource.getChildren()[0];
|
|
26229
|
+
const secondAssign = assignSource === null || assignSource === void 0 ? void 0 : assignSource.getChildren()[1];
|
|
26230
|
+
const thirdAssign = assignSource === null || assignSource === void 0 ? void 0 : assignSource.getChildren()[2];
|
|
26231
|
+
if ((secondAssign === null || secondAssign === void 0 ? void 0 : secondAssign.concatTokens()) === "=>" && firstAssign && (thirdAssign === null || thirdAssign === void 0 ? void 0 : thirdAssign.get()) instanceof Expressions.Dynamic) {
|
|
26232
|
+
const name = firstAssign.concatTokens();
|
|
26233
|
+
const found = scope.findObjectDefinition(name) === undefined || scope.findVariable(name);
|
|
26234
|
+
if (found === undefined && scope.getDDIC().inErrorNamespace(name)) {
|
|
26235
|
+
throw new Error(secondAssign.concatTokens() + " not found");
|
|
26236
|
+
}
|
|
26237
|
+
sourceType = new basic_1.VoidType("Dynamic");
|
|
26238
|
+
}
|
|
26239
|
+
else {
|
|
26240
|
+
sourceType = new source_1.Source().runSyntax(theSource, scope, filename);
|
|
26241
|
+
}
|
|
26242
|
+
if (sourceType === undefined || ((_a = node.findDirectExpression(Expressions.AssignSource)) === null || _a === void 0 ? void 0 : _a.findDirectExpression(Expressions.Dynamic))) {
|
|
26228
26243
|
sourceType = new basic_1.AnyType();
|
|
26229
26244
|
}
|
|
26230
|
-
for (const d of ((
|
|
26245
|
+
for (const d of ((_b = node.findDirectExpression(Expressions.AssignSource)) === null || _b === void 0 ? void 0 : _b.findAllExpressions(Expressions.Dynamic)) || []) {
|
|
26231
26246
|
new dynamic_1.Dynamic().runSyntax(d, scope, filename);
|
|
26232
26247
|
}
|
|
26233
26248
|
const target = node.findDirectExpression(Expressions.FSTarget);
|
|
@@ -26510,6 +26525,31 @@ exports.Case = Case;
|
|
|
26510
26525
|
|
|
26511
26526
|
/***/ }),
|
|
26512
26527
|
|
|
26528
|
+
/***/ "./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/case_type.js":
|
|
26529
|
+
/*!*************************************************************************************!*\
|
|
26530
|
+
!*** ./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/case_type.js ***!
|
|
26531
|
+
\*************************************************************************************/
|
|
26532
|
+
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
26533
|
+
|
|
26534
|
+
"use strict";
|
|
26535
|
+
|
|
26536
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
26537
|
+
exports.CaseType = void 0;
|
|
26538
|
+
const Expressions = __webpack_require__(/*! ../../2_statements/expressions */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js");
|
|
26539
|
+
const source_1 = __webpack_require__(/*! ../expressions/source */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/source.js");
|
|
26540
|
+
class CaseType {
|
|
26541
|
+
runSyntax(node, scope, filename) {
|
|
26542
|
+
// just recurse
|
|
26543
|
+
for (const s of node.findDirectExpressions(Expressions.Source)) {
|
|
26544
|
+
new source_1.Source().runSyntax(s, scope, filename);
|
|
26545
|
+
}
|
|
26546
|
+
}
|
|
26547
|
+
}
|
|
26548
|
+
exports.CaseType = CaseType;
|
|
26549
|
+
//# sourceMappingURL=case_type.js.map
|
|
26550
|
+
|
|
26551
|
+
/***/ }),
|
|
26552
|
+
|
|
26513
26553
|
/***/ "./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/catch.js":
|
|
26514
26554
|
/*!*********************************************************************************!*\
|
|
26515
26555
|
!*** ./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/catch.js ***!
|
|
@@ -26627,6 +26667,10 @@ class ClassData {
|
|
|
26627
26667
|
if (found === undefined) {
|
|
26628
26668
|
return undefined;
|
|
26629
26669
|
}
|
|
26670
|
+
if ((found === null || found === void 0 ? void 0 : found.getType().isGeneric()) === true
|
|
26671
|
+
&& (found === null || found === void 0 ? void 0 : found.getType().containsVoid()) === false) {
|
|
26672
|
+
throw new Error("DATA definition cannot be generic, " + found.getName());
|
|
26673
|
+
}
|
|
26630
26674
|
const meta = [...found.getMeta(), "static" /* IdentifierMeta.Static */];
|
|
26631
26675
|
return new _typed_identifier_1.TypedIdentifier(found.getToken(), filename, found.getType(), meta, found.getValue());
|
|
26632
26676
|
}
|
|
@@ -30399,6 +30443,10 @@ class Type {
|
|
|
30399
30443
|
}
|
|
30400
30444
|
const found = new basic_types_1.BasicTypes(filename, scope).simpleType(node, qualifiedNamePrefix);
|
|
30401
30445
|
if (found) {
|
|
30446
|
+
if ((found === null || found === void 0 ? void 0 : found.getType().isGeneric()) === true
|
|
30447
|
+
&& (found === null || found === void 0 ? void 0 : found.getType().containsVoid()) === false) {
|
|
30448
|
+
throw new Error("TYPES definition cannot be generic, " + found.getName());
|
|
30449
|
+
}
|
|
30402
30450
|
return found;
|
|
30403
30451
|
}
|
|
30404
30452
|
const fallback = node.findFirstExpression(Expressions.NamespaceSimpleName);
|
|
@@ -30593,6 +30641,7 @@ exports.WhenType = void 0;
|
|
|
30593
30641
|
const Expressions = __webpack_require__(/*! ../../2_statements/expressions */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js");
|
|
30594
30642
|
const basic_1 = __webpack_require__(/*! ../../types/basic */ "./node_modules/@abaplint/core/build/src/abap/types/basic/index.js");
|
|
30595
30643
|
const inline_data_1 = __webpack_require__(/*! ../expressions/inline_data */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/inline_data.js");
|
|
30644
|
+
const target_1 = __webpack_require__(/*! ../expressions/target */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/target.js");
|
|
30596
30645
|
class WhenType {
|
|
30597
30646
|
runSyntax(node, scope, filename) {
|
|
30598
30647
|
var _a;
|
|
@@ -30612,10 +30661,14 @@ class WhenType {
|
|
|
30612
30661
|
else {
|
|
30613
30662
|
type = new basic_1.ObjectReferenceType(found);
|
|
30614
30663
|
}
|
|
30615
|
-
const
|
|
30664
|
+
const target = node === null || node === void 0 ? void 0 : node.findDirectExpression(Expressions.Target);
|
|
30665
|
+
const inline = target === null || target === void 0 ? void 0 : target.findDirectExpression(Expressions.InlineData);
|
|
30616
30666
|
if (inline) {
|
|
30617
30667
|
new inline_data_1.InlineData().runSyntax(inline, scope, filename, type);
|
|
30618
30668
|
}
|
|
30669
|
+
else if (target) {
|
|
30670
|
+
new target_1.Target().runSyntax(target, scope, filename);
|
|
30671
|
+
}
|
|
30619
30672
|
}
|
|
30620
30673
|
}
|
|
30621
30674
|
exports.WhenType = WhenType;
|
|
@@ -31267,6 +31320,7 @@ const selection_screen_1 = __webpack_require__(/*! ./statements/selection_screen
|
|
|
31267
31320
|
const ranges_1 = __webpack_require__(/*! ./statements/ranges */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/ranges.js");
|
|
31268
31321
|
const write_1 = __webpack_require__(/*! ./statements/write */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/write.js");
|
|
31269
31322
|
const case_1 = __webpack_require__(/*! ./statements/case */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/case.js");
|
|
31323
|
+
const case_type_1 = __webpack_require__(/*! ./statements/case_type */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/case_type.js");
|
|
31270
31324
|
const create_object_1 = __webpack_require__(/*! ./statements/create_object */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/create_object.js");
|
|
31271
31325
|
const do_1 = __webpack_require__(/*! ./statements/do */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/do.js");
|
|
31272
31326
|
const concatenate_1 = __webpack_require__(/*! ./statements/concatenate */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/concatenate.js");
|
|
@@ -31423,6 +31477,7 @@ if (Object.keys(map).length === 0) {
|
|
|
31423
31477
|
addToMap(new insert_field_group_1.InsertFieldGroup());
|
|
31424
31478
|
addToMap(new get_time_1.GetTime());
|
|
31425
31479
|
addToMap(new unassign_1.Unassign());
|
|
31480
|
+
addToMap(new case_type_1.CaseType());
|
|
31426
31481
|
addToMap(new get_parameter_1.GetParameter());
|
|
31427
31482
|
addToMap(new format_1.Format());
|
|
31428
31483
|
addToMap(new when_type_1.WhenType());
|
|
@@ -39525,11 +39580,13 @@ const LServer = __webpack_require__(/*! vscode-languageserver-types */ "./node_m
|
|
|
39525
39580
|
const _lsp_utils_1 = __webpack_require__(/*! ./_lsp_utils */ "./node_modules/@abaplint/core/build/src/lsp/_lsp_utils.js");
|
|
39526
39581
|
const syntax_1 = __webpack_require__(/*! ../abap/5_syntax/syntax */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/syntax.js");
|
|
39527
39582
|
const _abap_object_1 = __webpack_require__(/*! ../objects/_abap_object */ "./node_modules/@abaplint/core/build/src/objects/_abap_object.js");
|
|
39583
|
+
const _reference_1 = __webpack_require__(/*! ../abap/5_syntax/_reference */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/_reference.js");
|
|
39584
|
+
const types_1 = __webpack_require__(/*! ../abap/types */ "./node_modules/@abaplint/core/build/src/abap/types/index.js");
|
|
39528
39585
|
class CodeLens {
|
|
39529
39586
|
constructor(reg) {
|
|
39530
39587
|
this.reg = reg;
|
|
39531
39588
|
}
|
|
39532
|
-
list(textDocument, settings = { messageText: true }) {
|
|
39589
|
+
list(textDocument, settings = { messageText: true, dynamicExceptions: true }) {
|
|
39533
39590
|
var _a;
|
|
39534
39591
|
const file = _lsp_utils_1.LSPUtils.getABAPFile(this.reg, textDocument.uri);
|
|
39535
39592
|
if (file === undefined) {
|
|
@@ -39539,7 +39596,7 @@ class CodeLens {
|
|
|
39539
39596
|
if (obj === undefined || !(obj instanceof _abap_object_1.ABAPObject)) {
|
|
39540
39597
|
return [];
|
|
39541
39598
|
}
|
|
39542
|
-
new syntax_1.SyntaxLogic(this.reg, obj).run();
|
|
39599
|
+
const top = new syntax_1.SyntaxLogic(this.reg, obj).run().spaghetti.getTop();
|
|
39543
39600
|
const ret = [];
|
|
39544
39601
|
if (settings.messageText === true) {
|
|
39545
39602
|
const list = this.reg.getMSAGReferences().listByFilename(file.getFilename());
|
|
@@ -39554,10 +39611,61 @@ class CodeLens {
|
|
|
39554
39611
|
}
|
|
39555
39612
|
ret.push({
|
|
39556
39613
|
range: _lsp_utils_1.LSPUtils.tokenToRange(l.token),
|
|
39557
|
-
command: LServer.Command.create(text, "")
|
|
39614
|
+
command: LServer.Command.create(text, "")
|
|
39558
39615
|
});
|
|
39559
39616
|
}
|
|
39560
39617
|
}
|
|
39618
|
+
if (settings.dynamicExceptions === true) {
|
|
39619
|
+
for (const ref of this.findMethodReferences(top, file)) {
|
|
39620
|
+
if (!(ref.resolved instanceof types_1.MethodDefinition)) {
|
|
39621
|
+
continue;
|
|
39622
|
+
}
|
|
39623
|
+
let text = "";
|
|
39624
|
+
for (const e of ref.resolved.getRaising()) {
|
|
39625
|
+
if (this.isDynamicException(e, top)) {
|
|
39626
|
+
if (text === "") {
|
|
39627
|
+
text = "Dynamic Exceptions: ";
|
|
39628
|
+
}
|
|
39629
|
+
else {
|
|
39630
|
+
text += " & ";
|
|
39631
|
+
}
|
|
39632
|
+
text += e.toUpperCase();
|
|
39633
|
+
}
|
|
39634
|
+
}
|
|
39635
|
+
if (text !== "") {
|
|
39636
|
+
ret.push({
|
|
39637
|
+
range: _lsp_utils_1.LSPUtils.tokenToRange(ref.position.getToken()),
|
|
39638
|
+
command: LServer.Command.create(text, "")
|
|
39639
|
+
});
|
|
39640
|
+
}
|
|
39641
|
+
}
|
|
39642
|
+
}
|
|
39643
|
+
return ret;
|
|
39644
|
+
}
|
|
39645
|
+
isDynamicException(name, top) {
|
|
39646
|
+
var _a;
|
|
39647
|
+
// todo: this method only works with global exceptions?
|
|
39648
|
+
let current = name;
|
|
39649
|
+
while (current !== undefined) {
|
|
39650
|
+
if (current.toUpperCase() === "CX_DYNAMIC_CHECK") {
|
|
39651
|
+
return true;
|
|
39652
|
+
}
|
|
39653
|
+
current = (_a = top.findClassDefinition(current)) === null || _a === void 0 ? void 0 : _a.getSuperClass();
|
|
39654
|
+
}
|
|
39655
|
+
return false;
|
|
39656
|
+
}
|
|
39657
|
+
findMethodReferences(node, file) {
|
|
39658
|
+
const ret = [];
|
|
39659
|
+
if (node.getIdentifier().filename === file.getFilename()) {
|
|
39660
|
+
for (const r of node.getData().references) {
|
|
39661
|
+
if (r.referenceType === _reference_1.ReferenceType.MethodReference) {
|
|
39662
|
+
ret.push(r);
|
|
39663
|
+
}
|
|
39664
|
+
}
|
|
39665
|
+
}
|
|
39666
|
+
for (const c of node.getChildren()) {
|
|
39667
|
+
ret.push(...this.findMethodReferences(c, file));
|
|
39668
|
+
}
|
|
39561
39669
|
return ret;
|
|
39562
39670
|
}
|
|
39563
39671
|
}
|
|
@@ -47678,7 +47786,7 @@ class Registry {
|
|
|
47678
47786
|
}
|
|
47679
47787
|
static abaplintVersion() {
|
|
47680
47788
|
// magic, see build script "version.sh"
|
|
47681
|
-
return "2.102.
|
|
47789
|
+
return "2.102.23";
|
|
47682
47790
|
}
|
|
47683
47791
|
getDDICReferences() {
|
|
47684
47792
|
return this.ddicReferences;
|
|
@@ -56392,6 +56500,8 @@ class FunctionModuleRecommendationsConf extends _basic_rule_config_1.BasicRuleCo
|
|
|
56392
56500
|
this.recommendations = [
|
|
56393
56501
|
{ name: "CALCULATE_HASH_FOR_RAW", replace: "use CL_ABAP_HMAC or CL_ABAP_MESSAGE_DIGEST" },
|
|
56394
56502
|
{ name: "CCU_TIMESTAMP_DIFFERENCE", replace: "use CL_ABAP_TSTMP" },
|
|
56503
|
+
{ name: "CONVERT_DATE_TO_EXTERNAL", replace: "use CL_ABAP_DATFM" },
|
|
56504
|
+
{ name: "CONVERT_TIME_INPUT", replace: "use CL_ABAP_TIMEFM" },
|
|
56395
56505
|
{ name: "ECATT_CONV_XSTRING_TO_STRING", replace: "use CL_BINARY_CONVERT" },
|
|
56396
56506
|
{ name: "F4_FILENAME", replace: "use CL_GUI_FRONTEND_SERVICES" },
|
|
56397
56507
|
{ name: "FUNCTION_EXISTS", replace: "surround with try-catch CX_SY_DYN_CALL_ILLEGAL_METHOD instead" },
|
|
@@ -64198,7 +64308,9 @@ class SelectPerformanceConf extends _basic_rule_config_1.BasicRuleConfig {
|
|
|
64198
64308
|
this.endSelect = true;
|
|
64199
64309
|
/** Detects SELECT * */
|
|
64200
64310
|
this.selectStar = true;
|
|
64201
|
-
/** "SELECT" * is considered okay if the table is less than X columns, the table must be known to the linter
|
|
64311
|
+
/** "SELECT" * is considered okay if the table is less than X columns, the table must be known to the linter
|
|
64312
|
+
* @default 10
|
|
64313
|
+
*/
|
|
64202
64314
|
this.starOkayIfFewColumns = DEFAULT_COLUMNS;
|
|
64203
64315
|
}
|
|
64204
64316
|
}
|
|
@@ -66156,6 +66268,11 @@ const syntax_1 = __webpack_require__(/*! ../abap/5_syntax/syntax */ "./node_modu
|
|
|
66156
66268
|
const _reference_1 = __webpack_require__(/*! ../abap/5_syntax/_reference */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/_reference.js");
|
|
66157
66269
|
const types_1 = __webpack_require__(/*! ../abap/types */ "./node_modules/@abaplint/core/build/src/abap/types/index.js");
|
|
66158
66270
|
class UncaughtExceptionConf extends _basic_rule_config_1.BasicRuleConfig {
|
|
66271
|
+
constructor() {
|
|
66272
|
+
super(...arguments);
|
|
66273
|
+
this.reportDynamic = false;
|
|
66274
|
+
this.reportNoCheck = false;
|
|
66275
|
+
}
|
|
66159
66276
|
}
|
|
66160
66277
|
exports.UncaughtExceptionConf = UncaughtExceptionConf;
|
|
66161
66278
|
class UncaughtException extends _abap_rule_1.ABAPRule {
|
|
@@ -66322,11 +66439,17 @@ class UncaughtException extends _abap_rule_1.ABAPRule {
|
|
|
66322
66439
|
return true;
|
|
66323
66440
|
}
|
|
66324
66441
|
const sup = this.globalExceptions[name.toUpperCase()];
|
|
66325
|
-
if (sup === "CX_DYNAMIC_CHECK"
|
|
66442
|
+
if (sup === "CX_DYNAMIC_CHECK" && this.getConfig().reportDynamic !== true) {
|
|
66443
|
+
return true;
|
|
66444
|
+
}
|
|
66445
|
+
if (sup === "CX_NO_CHECK" && this.getConfig().reportNoCheck !== true) {
|
|
66326
66446
|
return true;
|
|
66327
66447
|
}
|
|
66328
66448
|
const lsup = this.localExceptions[name.toUpperCase()];
|
|
66329
|
-
if (lsup === "CX_DYNAMIC_CHECK"
|
|
66449
|
+
if (lsup === "CX_DYNAMIC_CHECK" && this.getConfig().reportDynamic !== true) {
|
|
66450
|
+
return true;
|
|
66451
|
+
}
|
|
66452
|
+
if (lsup === "CX_NO_CHECK" && this.getConfig().reportNoCheck !== true) {
|
|
66330
66453
|
return true;
|
|
66331
66454
|
}
|
|
66332
66455
|
return this.sinked.some(a => a.toUpperCase() === name.toUpperCase())
|
|
@@ -66680,7 +66803,12 @@ ENDTRY.
|
|
|
66680
66803
|
MESSAGE w125(zbar) WITH c_foo INTO message.
|
|
66681
66804
|
SELECT SINGLE * FROM tadir INTO @DATA(sdfs).
|
|
66682
66805
|
IF sy-subrc <> 0.
|
|
66683
|
-
ENDIF
|
|
66806
|
+
ENDIF.
|
|
66807
|
+
|
|
66808
|
+
DATA: BEGIN OF blah ##NEEDED,
|
|
66809
|
+
test1 TYPE string,
|
|
66810
|
+
test2 TYPE string,
|
|
66811
|
+
END OF blah.`,
|
|
66684
66812
|
};
|
|
66685
66813
|
}
|
|
66686
66814
|
getConfig() {
|
|
@@ -66767,15 +66895,15 @@ ENDIF.`,
|
|
|
66767
66895
|
if (statement.findFirstExpression(Expressions.InlineData) === undefined
|
|
66768
66896
|
&& !(statement.get() instanceof Statements.Parameter)
|
|
66769
66897
|
&& !(statement.get() instanceof Statements.Data)
|
|
66770
|
-
&& !(statement.get() instanceof Statements.
|
|
66898
|
+
&& !(statement.get() instanceof Statements.DataBegin)
|
|
66771
66899
|
&& !(statement.get() instanceof Statements.Type)
|
|
66772
66900
|
&& !(statement.get() instanceof Statements.Form)
|
|
66773
66901
|
&& !(statement.get() instanceof Statements.Tables)
|
|
66774
|
-
&& !(statement.get() instanceof Statements.
|
|
66902
|
+
&& !(statement.get() instanceof Statements.TypeBegin)
|
|
66775
66903
|
&& !(statement.get() instanceof Statements.Constant)
|
|
66776
|
-
&& !(statement.get() instanceof Statements.
|
|
66904
|
+
&& !(statement.get() instanceof Statements.ConstantBegin)
|
|
66777
66905
|
&& !(statement.get() instanceof Statements.TypeEnum)
|
|
66778
|
-
&& !(statement.get() instanceof Statements.
|
|
66906
|
+
&& !(statement.get() instanceof Statements.TypeEnumBegin)
|
|
66779
66907
|
&& !(statement.get() instanceof Statements.MethodImplementation)
|
|
66780
66908
|
&& !(statement.get() instanceof Statements.MethodDef)
|
|
66781
66909
|
&& statement.findFirstExpression(Expressions.InlineFS) === undefined) {
|
|
@@ -79106,6 +79234,72 @@ exports.CaseTranspiler = CaseTranspiler;
|
|
|
79106
79234
|
|
|
79107
79235
|
/***/ }),
|
|
79108
79236
|
|
|
79237
|
+
/***/ "./node_modules/@abaplint/transpiler/build/src/structures/case_type.js":
|
|
79238
|
+
/*!*****************************************************************************!*\
|
|
79239
|
+
!*** ./node_modules/@abaplint/transpiler/build/src/structures/case_type.js ***!
|
|
79240
|
+
\*****************************************************************************/
|
|
79241
|
+
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
79242
|
+
|
|
79243
|
+
"use strict";
|
|
79244
|
+
|
|
79245
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
79246
|
+
exports.CaseTypeTranspiler = void 0;
|
|
79247
|
+
const abaplint = __webpack_require__(/*! @abaplint/core */ "./node_modules/@abaplint/core/build/src/index.js");
|
|
79248
|
+
const unique_identifier_1 = __webpack_require__(/*! ../unique_identifier */ "./node_modules/@abaplint/transpiler/build/src/unique_identifier.js");
|
|
79249
|
+
const chunk_1 = __webpack_require__(/*! ../chunk */ "./node_modules/@abaplint/transpiler/build/src/chunk.js");
|
|
79250
|
+
class CaseTypeTranspiler {
|
|
79251
|
+
transpile(node, traversal) {
|
|
79252
|
+
var _a;
|
|
79253
|
+
// does not use switch(), as it break;'s EXITs
|
|
79254
|
+
const s = (_a = node.findDirectStatement(abaplint.Statements.CaseType)) === null || _a === void 0 ? void 0 : _a.findDirectExpression(abaplint.Expressions.Source);
|
|
79255
|
+
if (s === undefined) {
|
|
79256
|
+
throw new Error("CASE TYPE, no Source found");
|
|
79257
|
+
}
|
|
79258
|
+
let first = true;
|
|
79259
|
+
const u = unique_identifier_1.UniqueIdentifier.get();
|
|
79260
|
+
const ret = new chunk_1.Chunk();
|
|
79261
|
+
// this determines and copies the value
|
|
79262
|
+
ret.append("let " + u + " = ", node, traversal);
|
|
79263
|
+
ret.appendChunk(traversal.traverse(s));
|
|
79264
|
+
ret.append(";\n", node, traversal);
|
|
79265
|
+
for (const w of node.findDirectStructures(abaplint.Structures.WhenType)) {
|
|
79266
|
+
for (const c of w.getChildren()) {
|
|
79267
|
+
if (c instanceof abaplint.Nodes.StatementNode && c.get() instanceof abaplint.Statements.WhenType) {
|
|
79268
|
+
if (first === true) {
|
|
79269
|
+
first = false;
|
|
79270
|
+
ret.appendString("if (");
|
|
79271
|
+
}
|
|
79272
|
+
else {
|
|
79273
|
+
ret.appendString("} else if (");
|
|
79274
|
+
}
|
|
79275
|
+
const cname = c.findDirectExpression(abaplint.Expressions.ClassName);
|
|
79276
|
+
const lookup = traversal.lookupClassOrInterface(cname === null || cname === void 0 ? void 0 : cname.concatTokens(), cname === null || cname === void 0 ? void 0 : cname.getFirstToken());
|
|
79277
|
+
ret.appendString(u + ".get() instanceof " + lookup);
|
|
79278
|
+
ret.appendString(") {\n");
|
|
79279
|
+
ret.appendString(traversal.traverse(c.findDirectExpression(abaplint.Expressions.Target)).getCode() + ".set(" + u + ")\n");
|
|
79280
|
+
}
|
|
79281
|
+
else if (c instanceof abaplint.Nodes.StatementNode && c.get() instanceof abaplint.Statements.WhenOthers) {
|
|
79282
|
+
if (first === true) {
|
|
79283
|
+
continue;
|
|
79284
|
+
}
|
|
79285
|
+
ret.appendString("} else {\n");
|
|
79286
|
+
}
|
|
79287
|
+
else {
|
|
79288
|
+
ret.appendChunk(traversal.traverse(c)); // Normal
|
|
79289
|
+
}
|
|
79290
|
+
}
|
|
79291
|
+
}
|
|
79292
|
+
if (first === false) {
|
|
79293
|
+
ret.appendString("}\n");
|
|
79294
|
+
}
|
|
79295
|
+
return ret;
|
|
79296
|
+
}
|
|
79297
|
+
}
|
|
79298
|
+
exports.CaseTypeTranspiler = CaseTypeTranspiler;
|
|
79299
|
+
//# sourceMappingURL=case_type.js.map
|
|
79300
|
+
|
|
79301
|
+
/***/ }),
|
|
79302
|
+
|
|
79109
79303
|
/***/ "./node_modules/@abaplint/transpiler/build/src/structures/class_definition.js":
|
|
79110
79304
|
/*!************************************************************************************!*\
|
|
79111
79305
|
!*** ./node_modules/@abaplint/transpiler/build/src/structures/class_definition.js ***!
|
|
@@ -79568,6 +79762,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
79568
79762
|
};
|
|
79569
79763
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
79570
79764
|
__exportStar(__webpack_require__(/*! ./case */ "./node_modules/@abaplint/transpiler/build/src/structures/case.js"), exports);
|
|
79765
|
+
__exportStar(__webpack_require__(/*! ./case_type */ "./node_modules/@abaplint/transpiler/build/src/structures/case_type.js"), exports);
|
|
79571
79766
|
__exportStar(__webpack_require__(/*! ./class_definition */ "./node_modules/@abaplint/transpiler/build/src/structures/class_definition.js"), exports);
|
|
79572
79767
|
__exportStar(__webpack_require__(/*! ./class_implementation */ "./node_modules/@abaplint/transpiler/build/src/structures/class_implementation.js"), exports);
|
|
79573
79768
|
__exportStar(__webpack_require__(/*! ./constants */ "./node_modules/@abaplint/transpiler/build/src/structures/constants.js"), exports);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abaplint/transpiler-cli",
|
|
3
|
-
"version": "2.7.
|
|
3
|
+
"version": "2.7.75",
|
|
4
4
|
"description": "Transpiler - Command Line Interface",
|
|
5
5
|
"funding": "https://github.com/sponsors/larshp",
|
|
6
6
|
"bin": {
|
|
@@ -26,12 +26,12 @@
|
|
|
26
26
|
"author": "abaplint",
|
|
27
27
|
"license": "MIT",
|
|
28
28
|
"devDependencies": {
|
|
29
|
-
"@abaplint/transpiler": "^2.7.
|
|
29
|
+
"@abaplint/transpiler": "^2.7.75",
|
|
30
30
|
"@types/glob": "^7.2.0",
|
|
31
31
|
"glob": "=7.2.0",
|
|
32
32
|
"@types/progress": "^2.0.5",
|
|
33
|
-
"@types/node": "^20.
|
|
34
|
-
"@abaplint/core": "^2.102.
|
|
33
|
+
"@types/node": "^20.5.0",
|
|
34
|
+
"@abaplint/core": "^2.102.23",
|
|
35
35
|
"progress": "^2.0.3",
|
|
36
36
|
"webpack": "^5.88.2",
|
|
37
37
|
"webpack-cli": "^5.1.4",
|