@abaplint/transpiler-cli 2.10.64 → 2.10.66
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 +231 -110
- package/package.json +5 -5
package/build/bundle.js
CHANGED
|
@@ -5368,7 +5368,7 @@ const combi_1 = __webpack_require__(/*! ../combi */ "./node_modules/@abaplint/co
|
|
|
5368
5368
|
class MessageClass extends combi_1.Expression {
|
|
5369
5369
|
getRunnable() {
|
|
5370
5370
|
// "&1" can be used for almost anything(field names, method names etc.) in macros
|
|
5371
|
-
return (0, combi_1.seq)((0, combi_1.regex)(/^>?[\w\/]
|
|
5371
|
+
return (0, combi_1.seq)((0, combi_1.regex)(/^>?[\w\/]+#?@?\/?!?&?>?\$?\??<?§?~?$/), (0, combi_1.starPrio)((0, combi_1.tok)(tokens_1.Plus)), (0, combi_1.starPrio)((0, combi_1.tok)(tokens_1.PlusW)), (0, combi_1.starPrio)((0, combi_1.seq)((0, combi_1.tok)(tokens_1.Dash), (0, combi_1.optPrio)((0, combi_1.regex)(/^\w+$/)))), (0, combi_1.optPrio)((0, combi_1.tok)(tokens_1.DashW)));
|
|
5372
5372
|
}
|
|
5373
5373
|
}
|
|
5374
5374
|
exports.MessageClass = MessageClass;
|
|
@@ -6488,7 +6488,7 @@ class SelectLoop extends combi_1.Expression {
|
|
|
6488
6488
|
const tab = (0, combi_1.seq)(_1.SQLIntoTable, (0, combi_1.alt)(pack, (0, combi_1.seq)(_1.SQLFrom, pack), (0, combi_1.seq)(pack, _1.SQLFrom)));
|
|
6489
6489
|
const packTab = (0, combi_1.seq)(pack, _1.SQLIntoTable);
|
|
6490
6490
|
const into = (0, combi_1.altPrio)(sql_into_structure_1.SQLIntoStructure, _1.SQLIntoList);
|
|
6491
|
-
const perm = (0, combi_1.per)(_1.SQLFrom, where, sql_up_to_1.SQLUpTo, sql_order_by_1.SQLOrderBy, sql_having_1.SQLHaving, _1.SQLClient, bypass, _1.SQLGroupBy, _1.SQLForAllEntries, (0, combi_1.alt)(tab,
|
|
6491
|
+
const perm = (0, combi_1.per)(_1.SQLFrom, where, sql_up_to_1.SQLUpTo, sql_order_by_1.SQLOrderBy, sql_having_1.SQLHaving, _1.SQLClient, bypass, _1.SQLGroupBy, _1.SQLForAllEntries, (0, combi_1.alt)(tab, sql_into_structure_1.SQLIntoStructure, _1.SQLIntoList, packTab));
|
|
6492
6492
|
const strict = (0, combi_1.seq)(_1.SQLFrom, (0, combi_1.ver)(version_1.Version.v750, sql_fields_loop_1.SQLFieldsLoop), (0, combi_1.optPrio)(_1.SQLForAllEntries), (0, combi_1.optPrio)((0, combi_1.seq)(where, (0, combi_1.optPrio)(sql_order_by_1.SQLOrderBy), into, (0, combi_1.optPrio)(sql_up_to_1.SQLUpTo))));
|
|
6493
6493
|
const aggr = (0, combi_1.seq)(_1.SQLAggregation, into, (0, combi_1.optPrio)(sql_up_to_1.SQLUpTo), _1.SQLFrom, where, _1.SQLGroupBy);
|
|
6494
6494
|
const ret = (0, combi_1.seq)("SELECT", (0, combi_1.altPrio)((0, combi_1.seq)((0, combi_1.optPrio)("DISTINCT"), sql_field_list_loop_1.SQLFieldListLoop, perm), strict, aggr), (0, combi_1.optPrio)(sql_hints_1.SQLHints));
|
|
@@ -7134,11 +7134,10 @@ const _1 = __webpack_require__(/*! . */ "./node_modules/@abaplint/core/build/src
|
|
|
7134
7134
|
const version_1 = __webpack_require__(/*! ../../../version */ "./node_modules/@abaplint/core/build/src/version.js");
|
|
7135
7135
|
const tokens_1 = __webpack_require__(/*! ../../1_lexer/tokens */ "./node_modules/@abaplint/core/build/src/abap/1_lexer/tokens/index.js");
|
|
7136
7136
|
const sql_function_1 = __webpack_require__(/*! ./sql_function */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_function.js");
|
|
7137
|
-
const simple_field_chain_1 = __webpack_require__(/*! ./simple_field_chain */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/simple_field_chain.js");
|
|
7138
7137
|
const sql_path_1 = __webpack_require__(/*! ./sql_path */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_path.js");
|
|
7139
7138
|
class SQLField extends combi_1.Expression {
|
|
7140
7139
|
getRunnable() {
|
|
7141
|
-
const abap = (0, combi_1.ver)(version_1.Version.v740sp05, (0, combi_1.seq)((0, combi_1.tok)(tokens_1.WAt),
|
|
7140
|
+
const abap = (0, combi_1.ver)(version_1.Version.v740sp05, (0, combi_1.seq)((0, combi_1.tok)(tokens_1.WAt), _1.SimpleFieldChain2));
|
|
7142
7141
|
const as = (0, combi_1.seq)("AS", _1.SQLAsName);
|
|
7143
7142
|
const field = (0, combi_1.altPrio)(_1.SQLAggregation, _1.SQLCase, sql_function_1.SQLFunction, sql_path_1.SQLPath, _1.SQLFieldName, abap, _1.Constant);
|
|
7144
7143
|
const sub = (0, combi_1.plusPrio)((0, combi_1.seq)((0, combi_1.altPrio)("+", "-", "*", "/", "&&"), (0, combi_1.optPrio)((0, combi_1.tok)(tokens_1.WParenLeftW)), field, (0, combi_1.optPrio)((0, combi_1.tok)(tokens_1.WParenRightW))));
|
|
@@ -7226,7 +7225,7 @@ class SQLFieldListLoop extends combi_1.Expression {
|
|
|
7226
7225
|
const comma = (0, combi_1.opt)((0, combi_1.ver)(version_1.Version.v740sp05, ","));
|
|
7227
7226
|
const as = (0, combi_1.seq)("AS", _1.SQLAsName);
|
|
7228
7227
|
const someField = (0, combi_1.seq)(_1.SQLField, comma);
|
|
7229
|
-
const abap = (0, combi_1.ver)(version_1.Version.v740sp05, (0, combi_1.seq)((0, combi_1.tok)(tokens_1.WAt), _1.
|
|
7228
|
+
const abap = (0, combi_1.ver)(version_1.Version.v740sp05, (0, combi_1.seq)((0, combi_1.tok)(tokens_1.WAt), _1.SimpleFieldChain2));
|
|
7230
7229
|
const fieldList = (0, combi_1.seq)((0, combi_1.star)(someField), (0, combi_1.alt)(_1.SQLFieldName, abap, sql_path_1.SQLPath, _1.Constant), (0, combi_1.optPrio)(as), comma, (0, combi_1.star)(someField));
|
|
7231
7230
|
const fields = (0, combi_1.alt)("*", _1.Dynamic, fieldList);
|
|
7232
7231
|
return fields;
|
|
@@ -7700,10 +7699,13 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
|
7700
7699
|
exports.SQLPath = void 0;
|
|
7701
7700
|
const combi_1 = __webpack_require__(/*! ../combi */ "./node_modules/@abaplint/core/build/src/abap/2_statements/combi.js");
|
|
7702
7701
|
const tokens_1 = __webpack_require__(/*! ../../1_lexer/tokens */ "./node_modules/@abaplint/core/build/src/abap/1_lexer/tokens/index.js");
|
|
7702
|
+
const association_name_1 = __webpack_require__(/*! ./association_name */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/association_name.js");
|
|
7703
|
+
const sql_cond_1 = __webpack_require__(/*! ./sql_cond */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_cond.js");
|
|
7703
7704
|
class SQLPath extends combi_1.Expression {
|
|
7704
7705
|
getRunnable() {
|
|
7705
7706
|
// todo, only from version?
|
|
7706
|
-
const
|
|
7707
|
+
const condition = (0, combi_1.seq)((0, combi_1.tok)(tokens_1.BracketLeftW), "ONE TO ONE WHERE", sql_cond_1.SQLCond, (0, combi_1.tok)(tokens_1.WBracketRight));
|
|
7708
|
+
const ret = (0, combi_1.seq)(association_name_1.AssociationName, (0, combi_1.optPrio)(condition), (0, combi_1.tok)(tokens_1.Dash), (0, combi_1.regex)(/\w+/));
|
|
7707
7709
|
return ret;
|
|
7708
7710
|
}
|
|
7709
7711
|
}
|
|
@@ -14874,7 +14876,7 @@ const version_1 = __webpack_require__(/*! ../../../version */ "./node_modules/@a
|
|
|
14874
14876
|
class Ranges {
|
|
14875
14877
|
getMatcher() {
|
|
14876
14878
|
const occurs = (0, combi_1.seq)("OCCURS", expressions_1.Source);
|
|
14877
|
-
const ret = (0, combi_1.seq)("RANGES", expressions_1.
|
|
14879
|
+
const ret = (0, combi_1.seq)("RANGES", expressions_1.DefinitionName, "FOR", expressions_1.SimpleFieldChain2, (0, combi_1.optPrio)(occurs), (0, combi_1.optPrio)(expressions_1.FieldLength));
|
|
14878
14880
|
return (0, combi_1.verNot)(version_1.Version.Cloud, ret);
|
|
14879
14881
|
}
|
|
14880
14882
|
}
|
|
@@ -14926,7 +14928,7 @@ class ReadEntities {
|
|
|
14926
14928
|
const from = (0, combi_1.seq)("FROM", expressions_1.Source);
|
|
14927
14929
|
const fields = (0, combi_1.seq)("FIELDS", (0, combi_1.tok)(tokens_1.WParenLeftW), (0, combi_1.plus)(expressions_1.SimpleName), (0, combi_1.tok)(tokens_1.WParenRightW), "WITH", expressions_1.Source);
|
|
14928
14930
|
const all = (0, combi_1.seq)("ALL FIELDS WITH", expressions_1.Source);
|
|
14929
|
-
const entity = (0, combi_1.seq)("ENTITY", expressions_1.
|
|
14931
|
+
const entity = (0, combi_1.seq)("ENTITY", expressions_1.NamespaceSimpleName, (0, combi_1.opt)((0, combi_1.seq)("BY", expressions_1.AssociationName)), (0, combi_1.alt)(fields, from, all), (0, combi_1.optPrio)((0, combi_1.seq)("RESULT", expressions_1.Target)));
|
|
14930
14932
|
const s = (0, combi_1.seq)("READ ENTITIES OF", expressions_1.NamespaceSimpleName, (0, combi_1.opt)("IN LOCAL MODE"), (0, combi_1.plus)(entity), (0, combi_1.optPrio)((0, combi_1.seq)("LINK", expressions_1.Target)), (0, combi_1.optPrio)((0, combi_1.seq)("FAILED", expressions_1.Target)), (0, combi_1.optPrio)((0, combi_1.seq)("REPORTED", expressions_1.Target)));
|
|
14931
14933
|
return (0, combi_1.ver)(version_1.Version.v754, s);
|
|
14932
14934
|
}
|
|
@@ -15009,7 +15011,7 @@ const version_1 = __webpack_require__(/*! ../../../version */ "./node_modules/@a
|
|
|
15009
15011
|
const transporting_fields_1 = __webpack_require__(/*! ../expressions/transporting_fields */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/transporting_fields.js");
|
|
15010
15012
|
class ReadTable {
|
|
15011
15013
|
getMatcher() {
|
|
15012
|
-
const comparing = (0, combi_1.seq)("COMPARING", (0, combi_1.alt)((0, combi_1.plus)(expressions_1.FieldSub), expressions_1.Dynamic));
|
|
15014
|
+
const comparing = (0, combi_1.seq)("COMPARING", (0, combi_1.alt)((0, combi_1.plus)(expressions_1.FieldSub), (0, combi_1.plus)(expressions_1.Dynamic)));
|
|
15013
15015
|
const index = (0, combi_1.seq)("INDEX", expressions_1.Source);
|
|
15014
15016
|
const components = (0, combi_1.seq)((0, combi_1.alt)(expressions_1.Field, expressions_1.Dynamic), "COMPONENTS", expressions_1.ComponentCompareSimple);
|
|
15015
15017
|
const key = (0, combi_1.seq)((0, combi_1.altPrio)("WITH KEY", "WITH TABLE KEY"), (0, combi_1.alt)(expressions_1.ComponentCompareSimple, components, (0, combi_1.seq)((0, combi_1.optPrio)("="), expressions_1.Source)));
|
|
@@ -24651,8 +24653,9 @@ const dereference_1 = __webpack_require__(/*! ./dereference */ "./node_modules/@
|
|
|
24651
24653
|
const source_field_symbol_1 = __webpack_require__(/*! ./source_field_symbol */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/source_field_symbol.js");
|
|
24652
24654
|
const source_field_1 = __webpack_require__(/*! ./source_field */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/source_field.js");
|
|
24653
24655
|
const _syntax_input_1 = __webpack_require__(/*! ../_syntax_input */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/_syntax_input.js");
|
|
24656
|
+
const version_1 = __webpack_require__(/*! ../../../version */ "./node_modules/@abaplint/core/build/src/version.js");
|
|
24654
24657
|
class FieldChain {
|
|
24655
|
-
static runSyntax(node, input, refType) {
|
|
24658
|
+
static runSyntax(node, input, refType, allowGenericDeference = false) {
|
|
24656
24659
|
var _a, _b, _c;
|
|
24657
24660
|
if (((_a = node.getFirstChild()) === null || _a === void 0 ? void 0 : _a.get()) instanceof Expressions.SourceField
|
|
24658
24661
|
&& node.findDirectExpression(Expressions.ComponentName)) {
|
|
@@ -24710,7 +24713,7 @@ class FieldChain {
|
|
|
24710
24713
|
}
|
|
24711
24714
|
}
|
|
24712
24715
|
else {
|
|
24713
|
-
const message = "Not a structure, FieldChain";
|
|
24716
|
+
const message = "Not a structure, FieldChain, " + (context === null || context === void 0 ? void 0 : context.constructor.name) + ", " + current.concatTokens();
|
|
24714
24717
|
input.issues.push((0, _syntax_input_1.syntaxIssue)(input, current.getFirstToken(), message));
|
|
24715
24718
|
return basic_1.VoidType.get(_syntax_input_1.CheckSyntaxKey);
|
|
24716
24719
|
}
|
|
@@ -24727,6 +24730,12 @@ class FieldChain {
|
|
|
24727
24730
|
}
|
|
24728
24731
|
else if (current.get() instanceof expressions_1.Dereference) {
|
|
24729
24732
|
context = dereference_1.Dereference.runSyntax(current, context, input);
|
|
24733
|
+
if (allowGenericDeference === false
|
|
24734
|
+
&& (context === null || context === void 0 ? void 0 : context.isGeneric()) === true
|
|
24735
|
+
&& input.scope.getVersion() < version_1.Version.v756
|
|
24736
|
+
&& input.scope.getVersion() !== version_1.Version.Cloud) {
|
|
24737
|
+
throw new Error("A generic reference cannot be dereferenced");
|
|
24738
|
+
}
|
|
24730
24739
|
}
|
|
24731
24740
|
else if (current.get() instanceof Expressions.ComponentName) {
|
|
24732
24741
|
if (context instanceof basic_1.TableType && context.isWithHeader()) {
|
|
@@ -26891,8 +26900,9 @@ const assert_error_1 = __webpack_require__(/*! ../assert_error */ "./node_module
|
|
|
26891
26900
|
* VALUE #( ... ). syntax error
|
|
26892
26901
|
* DATA(bar) = VALUE #( ... ). give error, no type can be derived
|
|
26893
26902
|
*/
|
|
26903
|
+
// TODO: refactor all these method parameters to objects, this is getting messy
|
|
26894
26904
|
class Source {
|
|
26895
|
-
static runSyntax(node, input, targetType, writeReference = false) {
|
|
26905
|
+
static runSyntax(node, input, targetType, writeReference = false, allowGenericDeference = false) {
|
|
26896
26906
|
if (node === undefined) {
|
|
26897
26907
|
return undefined;
|
|
26898
26908
|
}
|
|
@@ -27055,7 +27065,7 @@ class Source {
|
|
|
27055
27065
|
}
|
|
27056
27066
|
}
|
|
27057
27067
|
else if (get instanceof Expressions.FieldChain) {
|
|
27058
|
-
context = field_chain_1.FieldChain.runSyntax(first, input, type);
|
|
27068
|
+
context = field_chain_1.FieldChain.runSyntax(first, input, type, allowGenericDeference);
|
|
27059
27069
|
}
|
|
27060
27070
|
else if (get instanceof Expressions.StringTemplate) {
|
|
27061
27071
|
context = string_template_1.StringTemplate.runSyntax(first, input);
|
|
@@ -27720,7 +27730,7 @@ class Target {
|
|
|
27720
27730
|
&& !(context instanceof basic_1.TableType && context.isWithHeader() && context.getRowType() instanceof basic_1.StructureType)
|
|
27721
27731
|
&& !(context instanceof basic_1.TableType && context.isWithHeader() && context.getRowType() instanceof basic_1.VoidType)
|
|
27722
27732
|
&& !(context instanceof basic_1.VoidType)) {
|
|
27723
|
-
const message = "Not a structure, target";
|
|
27733
|
+
const message = "Not a structure, target, " + (context === null || context === void 0 ? void 0 : context.constructor.name) + ", " + current.concatTokens();
|
|
27724
27734
|
input.issues.push((0, _syntax_input_1.syntaxIssue)(input, node.getFirstToken(), message));
|
|
27725
27735
|
return basic_1.VoidType.get(_syntax_input_1.CheckSyntaxKey);
|
|
27726
27736
|
}
|
|
@@ -28727,7 +28737,7 @@ class Assign {
|
|
|
28727
28737
|
sourceType = basic_1.VoidType.get("Dynamic");
|
|
28728
28738
|
}
|
|
28729
28739
|
else {
|
|
28730
|
-
sourceType = source_1.Source.runSyntax(theSource, input);
|
|
28740
|
+
sourceType = source_1.Source.runSyntax(theSource, input, undefined, false, true);
|
|
28731
28741
|
}
|
|
28732
28742
|
if ((assignSource === null || assignSource === void 0 ? void 0 : assignSource.getChildren().length) === 5
|
|
28733
28743
|
&& ((_a = assignSource === null || assignSource === void 0 ? void 0 : assignSource.getFirstChild()) === null || _a === void 0 ? void 0 : _a.concatTokens().toUpperCase()) === "COMPONENT") {
|
|
@@ -29377,6 +29387,30 @@ exports.Clear = Clear;
|
|
|
29377
29387
|
|
|
29378
29388
|
/***/ }),
|
|
29379
29389
|
|
|
29390
|
+
/***/ "./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/close_cursor.js":
|
|
29391
|
+
/*!****************************************************************************************!*\
|
|
29392
|
+
!*** ./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/close_cursor.js ***!
|
|
29393
|
+
\****************************************************************************************/
|
|
29394
|
+
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
29395
|
+
|
|
29396
|
+
"use strict";
|
|
29397
|
+
|
|
29398
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
29399
|
+
exports.CloseCursor = void 0;
|
|
29400
|
+
const Expressions = __webpack_require__(/*! ../../2_statements/expressions */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js");
|
|
29401
|
+
const sql_source_1 = __webpack_require__(/*! ../expressions/sql_source */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/sql_source.js");
|
|
29402
|
+
class CloseCursor {
|
|
29403
|
+
runSyntax(node, input) {
|
|
29404
|
+
for (const t of node.findAllExpressions(Expressions.SQLSourceSimple)) {
|
|
29405
|
+
sql_source_1.SQLSource.runSyntax(t, input);
|
|
29406
|
+
}
|
|
29407
|
+
}
|
|
29408
|
+
}
|
|
29409
|
+
exports.CloseCursor = CloseCursor;
|
|
29410
|
+
//# sourceMappingURL=close_cursor.js.map
|
|
29411
|
+
|
|
29412
|
+
/***/ }),
|
|
29413
|
+
|
|
29380
29414
|
/***/ "./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/close_dataset.js":
|
|
29381
29415
|
/*!*****************************************************************************************!*\
|
|
29382
29416
|
!*** ./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/close_dataset.js ***!
|
|
@@ -30358,6 +30392,30 @@ exports.Export = Export;
|
|
|
30358
30392
|
|
|
30359
30393
|
/***/ }),
|
|
30360
30394
|
|
|
30395
|
+
/***/ "./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/fetch_next_cursor.js":
|
|
30396
|
+
/*!*********************************************************************************************!*\
|
|
30397
|
+
!*** ./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/fetch_next_cursor.js ***!
|
|
30398
|
+
\*********************************************************************************************/
|
|
30399
|
+
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
30400
|
+
|
|
30401
|
+
"use strict";
|
|
30402
|
+
|
|
30403
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
30404
|
+
exports.FetchNextCursor = void 0;
|
|
30405
|
+
const Expressions = __webpack_require__(/*! ../../2_statements/expressions */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js");
|
|
30406
|
+
const target_1 = __webpack_require__(/*! ../expressions/target */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/target.js");
|
|
30407
|
+
class FetchNextCursor {
|
|
30408
|
+
runSyntax(node, input) {
|
|
30409
|
+
for (const t of node.findAllExpressions(Expressions.Target)) {
|
|
30410
|
+
target_1.Target.runSyntax(t, input);
|
|
30411
|
+
}
|
|
30412
|
+
}
|
|
30413
|
+
}
|
|
30414
|
+
exports.FetchNextCursor = FetchNextCursor;
|
|
30415
|
+
//# sourceMappingURL=fetch_next_cursor.js.map
|
|
30416
|
+
|
|
30417
|
+
/***/ }),
|
|
30418
|
+
|
|
30361
30419
|
/***/ "./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/fieldsymbol.js":
|
|
30362
30420
|
/*!***************************************************************************************!*\
|
|
30363
30421
|
!*** ./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/fieldsymbol.js ***!
|
|
@@ -31122,7 +31180,12 @@ class InsertInternal {
|
|
|
31122
31180
|
inline_data_1.InlineData.runSyntax(afterInto, input, new basic_1.DataReference(sourceType));
|
|
31123
31181
|
}
|
|
31124
31182
|
else {
|
|
31125
|
-
target_1.Target.runSyntax(afterInto, input);
|
|
31183
|
+
const type = target_1.Target.runSyntax(afterInto, input);
|
|
31184
|
+
if (type instanceof basic_1.TableType && type.getAccessType() === basic_1.TableAccessType.hashed) {
|
|
31185
|
+
const message = "Implicit or explicit index operation on hashed table is not possible";
|
|
31186
|
+
input.issues.push((0, _syntax_input_1.syntaxIssue)(input, node.getFirstToken(), message));
|
|
31187
|
+
return;
|
|
31188
|
+
}
|
|
31126
31189
|
}
|
|
31127
31190
|
}
|
|
31128
31191
|
for (const s of node.findDirectExpressions(Expressions.Source)) {
|
|
@@ -31803,6 +31866,30 @@ exports.Multiply = Multiply;
|
|
|
31803
31866
|
|
|
31804
31867
|
/***/ }),
|
|
31805
31868
|
|
|
31869
|
+
/***/ "./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/open_cursor.js":
|
|
31870
|
+
/*!***************************************************************************************!*\
|
|
31871
|
+
!*** ./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/open_cursor.js ***!
|
|
31872
|
+
\***************************************************************************************/
|
|
31873
|
+
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
31874
|
+
|
|
31875
|
+
"use strict";
|
|
31876
|
+
|
|
31877
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
31878
|
+
exports.OpenCursor = void 0;
|
|
31879
|
+
const Expressions = __webpack_require__(/*! ../../2_statements/expressions */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js");
|
|
31880
|
+
const target_1 = __webpack_require__(/*! ../expressions/target */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/target.js");
|
|
31881
|
+
class OpenCursor {
|
|
31882
|
+
runSyntax(node, input) {
|
|
31883
|
+
for (const t of node.findAllExpressions(Expressions.Target)) {
|
|
31884
|
+
target_1.Target.runSyntax(t, input);
|
|
31885
|
+
}
|
|
31886
|
+
}
|
|
31887
|
+
}
|
|
31888
|
+
exports.OpenCursor = OpenCursor;
|
|
31889
|
+
//# sourceMappingURL=open_cursor.js.map
|
|
31890
|
+
|
|
31891
|
+
/***/ }),
|
|
31892
|
+
|
|
31806
31893
|
/***/ "./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/open_dataset.js":
|
|
31807
31894
|
/*!****************************************************************************************!*\
|
|
31808
31895
|
!*** ./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/open_dataset.js ***!
|
|
@@ -32135,7 +32222,7 @@ const assert_error_1 = __webpack_require__(/*! ../assert_error */ "./node_module
|
|
|
32135
32222
|
class Ranges {
|
|
32136
32223
|
runSyntax(node, input) {
|
|
32137
32224
|
var _a;
|
|
32138
|
-
const nameToken = (_a = node.findFirstExpression(Expressions.
|
|
32225
|
+
const nameToken = (_a = node.findFirstExpression(Expressions.DefinitionName)) === null || _a === void 0 ? void 0 : _a.getFirstToken();
|
|
32139
32226
|
const typeExpression = node.findFirstExpression(Expressions.SimpleFieldChain2);
|
|
32140
32227
|
if (typeExpression === undefined) {
|
|
32141
32228
|
throw new assert_error_1.AssertError("Ranges, unexpected node");
|
|
@@ -34333,6 +34420,9 @@ const get_reference_1 = __webpack_require__(/*! ./statements/get_reference */ ".
|
|
|
34333
34420
|
const insert_database_1 = __webpack_require__(/*! ./statements/insert_database */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/insert_database.js");
|
|
34334
34421
|
const delete_database_1 = __webpack_require__(/*! ./statements/delete_database */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/delete_database.js");
|
|
34335
34422
|
const import_dynpro_1 = __webpack_require__(/*! ./statements/import_dynpro */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/import_dynpro.js");
|
|
34423
|
+
const open_cursor_1 = __webpack_require__(/*! ./statements/open_cursor */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/open_cursor.js");
|
|
34424
|
+
const fetch_next_cursor_1 = __webpack_require__(/*! ./statements/fetch_next_cursor */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/fetch_next_cursor.js");
|
|
34425
|
+
const close_cursor_1 = __webpack_require__(/*! ./statements/close_cursor */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/close_cursor.js");
|
|
34336
34426
|
const syntax_check_1 = __webpack_require__(/*! ./statements/syntax_check */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/syntax_check.js");
|
|
34337
34427
|
const import_1 = __webpack_require__(/*! ./statements/import */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/import.js");
|
|
34338
34428
|
const export_1 = __webpack_require__(/*! ./statements/export */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/export.js");
|
|
@@ -34517,6 +34607,9 @@ if (Object.keys(map).length === 0) {
|
|
|
34517
34607
|
addToMap(new modify_entities_1.ModifyEntities());
|
|
34518
34608
|
addToMap(new commit_entities_1.CommitEntities());
|
|
34519
34609
|
addToMap(new call_kernel_1.CallKernel());
|
|
34610
|
+
addToMap(new open_cursor_1.OpenCursor());
|
|
34611
|
+
addToMap(new fetch_next_cursor_1.FetchNextCursor());
|
|
34612
|
+
addToMap(new close_cursor_1.CloseCursor());
|
|
34520
34613
|
addToMap(new search_1.Search());
|
|
34521
34614
|
addToMap(new translate_1.Translate());
|
|
34522
34615
|
addToMap(new modify_internal_1.ModifyInternal());
|
|
@@ -39462,6 +39555,9 @@ class MethodParameters {
|
|
|
39462
39555
|
if (concat.includes(" FOR VALIDATE ")
|
|
39463
39556
|
|| concat.includes(" FOR BEHAVIOR ")
|
|
39464
39557
|
|| concat.includes(" FOR FEATURES ")
|
|
39558
|
+
|| concat.includes(" FOR INSTANCE FEATURES ")
|
|
39559
|
+
|| concat.includes(" FOR READ ")
|
|
39560
|
+
|| concat.includes(" FOR LOCK ")
|
|
39465
39561
|
|| concat.includes(" FOR MODIFY ")) {
|
|
39466
39562
|
const token = isRap.getFirstToken();
|
|
39467
39563
|
this.exporting.push(new _typed_identifier_1.TypedIdentifier(new identifier_1.Identifier(token.getStart(), "failed"), input.filename, basic_1.VoidType.get("RapMethodParameter"), ["exporting" /* IdentifierMeta.MethodExporting */]));
|
|
@@ -40347,9 +40443,9 @@ const cds_name_1 = __webpack_require__(/*! ./cds_name */ "./node_modules/@abapli
|
|
|
40347
40443
|
const cds_type_1 = __webpack_require__(/*! ./cds_type */ "./node_modules/@abaplint/core/build/src/cds/expressions/cds_type.js");
|
|
40348
40444
|
class CDSDefineCustom extends combi_1.Expression {
|
|
40349
40445
|
getRunnable() {
|
|
40350
|
-
const field = (0, combi_1.seq)((0, combi_1.
|
|
40351
|
-
const
|
|
40352
|
-
return (0, combi_1.seq)((0, combi_1.star)(_1.CDSAnnotation), (0, combi_1.str)("DEFINE"), (0, combi_1.opt)((0, combi_1.str)("ROOT")), (0, combi_1.str)("CUSTOM ENTITY"), cds_name_1.CDSName, (0, combi_1.str)("{"), (0, combi_1.plus)((0, combi_1.alt)(field,
|
|
40446
|
+
const field = (0, combi_1.seq)((0, combi_1.opt)((0, combi_1.str)("KEY")), cds_name_1.CDSName, ":", cds_type_1.CDSType, ";");
|
|
40447
|
+
const compsiOrAssoci = (0, combi_1.seq)(cds_name_1.CDSName, ":", (0, combi_1.alt)(_1.CDSComposition, _1.CDSAssociation), ";");
|
|
40448
|
+
return (0, combi_1.seq)((0, combi_1.star)(_1.CDSAnnotation), (0, combi_1.str)("DEFINE"), (0, combi_1.opt)((0, combi_1.str)("ROOT")), (0, combi_1.str)("CUSTOM ENTITY"), cds_name_1.CDSName, (0, combi_1.str)("{"), (0, combi_1.plus)((0, combi_1.seq)((0, combi_1.star)(_1.CDSAnnotation), (0, combi_1.alt)(field, compsiOrAssoci))), (0, combi_1.str)("}"), (0, combi_1.opt)(";"));
|
|
40353
40449
|
}
|
|
40354
40450
|
}
|
|
40355
40451
|
exports.CDSDefineCustom = CDSDefineCustom;
|
|
@@ -40372,7 +40468,7 @@ const __1 = __webpack_require__(/*! ../.. */ "./node_modules/@abaplint/core/buil
|
|
|
40372
40468
|
const combi_1 = __webpack_require__(/*! ../../abap/2_statements/combi */ "./node_modules/@abaplint/core/build/src/abap/2_statements/combi.js");
|
|
40373
40469
|
class CDSDefineProjection extends combi_1.Expression {
|
|
40374
40470
|
getRunnable() {
|
|
40375
|
-
return (0, combi_1.seq)((0, combi_1.star)(_1.CDSAnnotation), "DEFINE", (0, combi_1.opt)("ROOT"), "VIEW", (0, combi_1.ver)(__1.Version.v755, (0, combi_1.opt)("ENTITY")), _1.CDSName, (0, combi_1.opt)(_1.CDSProviderContract), "AS PROJECTION ON", _1.CDSName, (0, combi_1.opt)(_1.CDSAs), (0, combi_1.str)("{"), (0, combi_1.plus)(_1.CDSElement), (0, combi_1.star)((0, combi_1.seq)(",", _1.CDSElement)), (0, combi_1.str)("}"), (0, combi_1.opt)(";"));
|
|
40471
|
+
return (0, combi_1.seq)((0, combi_1.star)(_1.CDSAnnotation), "DEFINE", (0, combi_1.opt)("ROOT"), "VIEW", (0, combi_1.ver)(__1.Version.v755, (0, combi_1.opt)("ENTITY")), _1.CDSName, (0, combi_1.opt)(_1.CDSProviderContract), "AS PROJECTION ON", _1.CDSName, (0, combi_1.opt)(_1.CDSAs), (0, combi_1.str)("{"), (0, combi_1.plus)(_1.CDSElement), (0, combi_1.star)((0, combi_1.seq)(",", _1.CDSElement)), (0, combi_1.str)("}"), (0, combi_1.opt)(_1.CDSWhere), (0, combi_1.opt)(";"));
|
|
40376
40472
|
}
|
|
40377
40473
|
}
|
|
40378
40474
|
exports.CDSDefineProjection = CDSDefineProjection;
|
|
@@ -40446,7 +40542,9 @@ const cds_as_1 = __webpack_require__(/*! ./cds_as */ "./node_modules/@abaplint/c
|
|
|
40446
40542
|
const cds_cast_1 = __webpack_require__(/*! ./cds_cast */ "./node_modules/@abaplint/core/build/src/cds/expressions/cds_cast.js");
|
|
40447
40543
|
class CDSElement extends combi_1.Expression {
|
|
40448
40544
|
getRunnable() {
|
|
40449
|
-
|
|
40545
|
+
const redirected = (0, combi_1.seq)(": REDIRECTED TO", (0, combi_1.opt)((0, combi_1.alt)("PARENT", "COMPOSITION CHILD")), _1.CDSName);
|
|
40546
|
+
const colonThing = (0, combi_1.seq)(":", _1.CDSName);
|
|
40547
|
+
return (0, combi_1.seq)((0, combi_1.starPrio)(_1.CDSAnnotation), (0, combi_1.optPrio)("KEY"), (0, combi_1.altPrio)(_1.CDSAggregate, _1.CDSString, _1.CDSArithmetics, _1.CDSFunction, cds_cast_1.CDSCast, _1.CDSCase, (0, combi_1.seq)("(", _1.CDSCase, ")"), (0, combi_1.seq)(_1.CDSPrefixedName, (0, combi_1.opt)((0, combi_1.alt)(redirected, colonThing))), _1.CDSInteger), (0, combi_1.opt)(cds_as_1.CDSAs));
|
|
40450
40548
|
}
|
|
40451
40549
|
}
|
|
40452
40550
|
exports.CDSElement = CDSElement;
|
|
@@ -40817,7 +40915,7 @@ class CDSSelect extends combi_1.Expression {
|
|
|
40817
40915
|
const distinct = (0, combi_1.str)("DISTINCT");
|
|
40818
40916
|
const elementList = (0, combi_1.seq)(_1.CDSElement, (0, combi_1.starPrio)((0, combi_1.seq)(",", _1.CDSElement)));
|
|
40819
40917
|
const elements = (0, combi_1.seq)((0, combi_1.str)("{"), (0, combi_1.altPrio)("*", elementList), (0, combi_1.str)("}"));
|
|
40820
|
-
return (0, combi_1.seq)("SELECT", (0, combi_1.optPrio)(distinct), (0, combi_1.opt)((0, combi_1.alt)("*", fields)), "FROM", _1.CDSSource, (0, combi_1.star)(cds_join_1.CDSJoin), (0, combi_1.star)(
|
|
40918
|
+
return (0, combi_1.seq)("SELECT", (0, combi_1.optPrio)(distinct), (0, combi_1.opt)((0, combi_1.alt)("*", fields)), "FROM", _1.CDSSource, (0, combi_1.star)(cds_join_1.CDSJoin), (0, combi_1.star)((0, combi_1.alt)(_1.CDSComposition, cds_association_1.CDSAssociation)), (0, combi_1.opt)(elements), (0, combi_1.optPrio)(_1.CDSWhere), (0, combi_1.optPrio)(_1.CDSGroupBy), (0, combi_1.optPrio)(_1.CDSHaving), (0, combi_1.optPrio)((0, combi_1.seq)("UNION", (0, combi_1.optPrio)("ALL"), CDSSelect)));
|
|
40821
40919
|
}
|
|
40822
40920
|
}
|
|
40823
40921
|
exports.CDSSelect = CDSSelect;
|
|
@@ -47207,8 +47305,12 @@ class DataElement extends _abstract_object_1.AbstractObject {
|
|
|
47207
47305
|
references.push({ object: lookup.object });
|
|
47208
47306
|
}
|
|
47209
47307
|
reg.getDDICReferences().setUsing(this, references);
|
|
47210
|
-
|
|
47211
|
-
|
|
47308
|
+
if (!(lookup.type instanceof Types.UnknownType)) {
|
|
47309
|
+
// the referenced type might not exist or contain syntax errors(for CLAS)
|
|
47310
|
+
// so dont cache it, expect the user to fix it
|
|
47311
|
+
this.parsedType = lookup.type;
|
|
47312
|
+
}
|
|
47313
|
+
return lookup.type;
|
|
47212
47314
|
}
|
|
47213
47315
|
parse() {
|
|
47214
47316
|
var _a, _b, _c;
|
|
@@ -47987,12 +48089,14 @@ class FunctionGroup extends _abap_object_1.ABAPObject {
|
|
|
47987
48089
|
}
|
|
47988
48090
|
if ((i.startsWith("L") || namespaced) && f.getFilename().includes(search.toLowerCase() + ".")) {
|
|
47989
48091
|
ret.push({ file: f, name: i });
|
|
48092
|
+
break;
|
|
47990
48093
|
}
|
|
47991
48094
|
// fix for URL encoded? Uris
|
|
47992
48095
|
if (namespaced) {
|
|
47993
48096
|
search = i.replace(/\//g, "%23");
|
|
47994
48097
|
if (f.getFilename().includes(search.toLowerCase() + ".")) {
|
|
47995
48098
|
ret.push({ file: f, name: i });
|
|
48099
|
+
break;
|
|
47996
48100
|
}
|
|
47997
48101
|
}
|
|
47998
48102
|
}
|
|
@@ -53474,14 +53578,14 @@ class Registry {
|
|
|
53474
53578
|
this.objects = {};
|
|
53475
53579
|
this.objectsByType = {};
|
|
53476
53580
|
this.dependencies = {};
|
|
53477
|
-
this.conf
|
|
53581
|
+
this.setConfig(conf ? conf : config_1.Config.getDefault());
|
|
53478
53582
|
this.ddicReferences = new ddic_references_1.DDICReferences();
|
|
53479
53583
|
this.msagReferences = new msag_references_1.MSAGReferences();
|
|
53480
53584
|
this.macroReferences = new macro_references_1.MacroReferences();
|
|
53481
53585
|
}
|
|
53482
53586
|
static abaplintVersion() {
|
|
53483
53587
|
// magic, see build script "version.sh"
|
|
53484
|
-
return "2.113.
|
|
53588
|
+
return "2.113.149";
|
|
53485
53589
|
}
|
|
53486
53590
|
getDDICReferences() {
|
|
53487
53591
|
return this.ddicReferences;
|
|
@@ -53559,12 +53663,11 @@ class Registry {
|
|
|
53559
53663
|
obj.setDirty();
|
|
53560
53664
|
}
|
|
53561
53665
|
this.conf = conf;
|
|
53666
|
+
this.errorNamespace = new RegExp(this.getConfig().getSyntaxSetttings().errorNamespace, "i");
|
|
53562
53667
|
return this;
|
|
53563
53668
|
}
|
|
53564
53669
|
inErrorNamespace(name) {
|
|
53565
|
-
|
|
53566
|
-
const reg = new RegExp(this.getConfig().getSyntaxSetttings().errorNamespace, "i");
|
|
53567
|
-
return reg.test(name);
|
|
53670
|
+
return this.errorNamespace.test(name);
|
|
53568
53671
|
}
|
|
53569
53672
|
addFile(file) {
|
|
53570
53673
|
return this.addFiles([file]);
|
|
@@ -69860,15 +69963,20 @@ This rule makes sure the spaces are consistently required across the language.`,
|
|
|
69860
69963
|
return undefined;
|
|
69861
69964
|
}
|
|
69862
69965
|
checkSource(cond) {
|
|
69966
|
+
var _a, _b;
|
|
69863
69967
|
const children = cond.getAllTokens();
|
|
69864
69968
|
if (children.length < 2) {
|
|
69865
69969
|
return undefined;
|
|
69866
69970
|
}
|
|
69867
69971
|
if (children.length >= 4
|
|
69868
69972
|
&& children[0].getStr().toUpperCase() === "CONV") {
|
|
69869
|
-
const
|
|
69870
|
-
const
|
|
69871
|
-
|
|
69973
|
+
const directChildren = cond.getChildren();
|
|
69974
|
+
const first = (_a = directChildren[2]) === null || _a === void 0 ? void 0 : _a.getLastToken();
|
|
69975
|
+
const second = (_b = directChildren[3]) === null || _b === void 0 ? void 0 : _b.getFirstToken();
|
|
69976
|
+
if (first
|
|
69977
|
+
&& first.getStr() === "("
|
|
69978
|
+
&& second
|
|
69979
|
+
&& first.getRow() === second.getRow()
|
|
69872
69980
|
&& first.getCol() + 1 === second.getStart().getCol()) {
|
|
69873
69981
|
return second.getStart();
|
|
69874
69982
|
}
|
|
@@ -76254,9 +76362,35 @@ const artifacts_rules_1 = __webpack_require__(/*! ./artifacts_rules */ "./node_m
|
|
|
76254
76362
|
const _abap_object_1 = __webpack_require__(/*! ./objects/_abap_object */ "./node_modules/@abaplint/core/build/src/objects/_abap_object.js");
|
|
76255
76363
|
const skip_logic_1 = __webpack_require__(/*! ./skip_logic */ "./node_modules/@abaplint/core/build/src/skip_logic.js");
|
|
76256
76364
|
const excludeHelper_1 = __webpack_require__(/*! ./utils/excludeHelper */ "./node_modules/@abaplint/core/build/src/utils/excludeHelper.js");
|
|
76365
|
+
class SyntaxPerformance {
|
|
76366
|
+
constructor() {
|
|
76367
|
+
this.results = [];
|
|
76368
|
+
}
|
|
76369
|
+
push(obj, runtime) {
|
|
76370
|
+
if (runtime < 100) {
|
|
76371
|
+
return;
|
|
76372
|
+
}
|
|
76373
|
+
this.results.push({
|
|
76374
|
+
runtime: runtime,
|
|
76375
|
+
name: obj.getType() + " " + obj.getName(),
|
|
76376
|
+
});
|
|
76377
|
+
}
|
|
76378
|
+
output() {
|
|
76379
|
+
const MAX = 10;
|
|
76380
|
+
this.results.sort((a, b) => { return b.runtime - a.runtime; });
|
|
76381
|
+
for (let i = 0; i < MAX; i++) {
|
|
76382
|
+
const row = this.results[i];
|
|
76383
|
+
if (row === undefined) {
|
|
76384
|
+
break;
|
|
76385
|
+
}
|
|
76386
|
+
process.stderr.write(`\t${row.runtime}ms\t${row.name}\n`);
|
|
76387
|
+
}
|
|
76388
|
+
}
|
|
76389
|
+
}
|
|
76257
76390
|
class RulesRunner {
|
|
76258
76391
|
constructor(reg) {
|
|
76259
76392
|
this.reg = reg;
|
|
76393
|
+
this.syntaxPerformance = new SyntaxPerformance();
|
|
76260
76394
|
}
|
|
76261
76395
|
objectsToCheck(objects) {
|
|
76262
76396
|
const check = [];
|
|
@@ -76281,16 +76415,33 @@ class RulesRunner {
|
|
|
76281
76415
|
for (const obj of check) {
|
|
76282
76416
|
(_b = input === null || input === void 0 ? void 0 : input.progress) === null || _b === void 0 ? void 0 : _b.tick("Run Syntax - " + obj.getName());
|
|
76283
76417
|
if (obj instanceof _abap_object_1.ABAPObject) {
|
|
76418
|
+
const start = Date.now();
|
|
76284
76419
|
new syntax_1.SyntaxLogic(this.reg, obj).run();
|
|
76420
|
+
if ((input === null || input === void 0 ? void 0 : input.outputPerformance) === true) {
|
|
76421
|
+
this.syntaxPerformance.push(obj, Date.now() - start);
|
|
76422
|
+
}
|
|
76285
76423
|
}
|
|
76286
76424
|
}
|
|
76425
|
+
if ((input === null || input === void 0 ? void 0 : input.outputPerformance) === true) {
|
|
76426
|
+
process.stderr.write("Syntax Performance:\n");
|
|
76427
|
+
this.syntaxPerformance.output();
|
|
76428
|
+
}
|
|
76287
76429
|
(_c = input === null || input === void 0 ? void 0 : input.progress) === null || _c === void 0 ? void 0 : _c.set(rules.length, "Initialize Rules");
|
|
76288
76430
|
for (const rule of rules) {
|
|
76289
|
-
|
|
76431
|
+
const start = Date.now();
|
|
76432
|
+
if ((input === null || input === void 0 ? void 0 : input.outputPerformance) === true) {
|
|
76433
|
+
process.stderr.write("Initializing rule " + rule.getMetadata().key);
|
|
76434
|
+
}
|
|
76435
|
+
else {
|
|
76436
|
+
(_d = input === null || input === void 0 ? void 0 : input.progress) === null || _d === void 0 ? void 0 : _d.tick("Initialize Rules - " + rule.getMetadata().key);
|
|
76437
|
+
}
|
|
76290
76438
|
if (rule.initialize === undefined) {
|
|
76291
76439
|
throw new Error(rule.getMetadata().key + " missing initialize method");
|
|
76292
76440
|
}
|
|
76293
76441
|
rule.initialize(this.reg);
|
|
76442
|
+
if ((input === null || input === void 0 ? void 0 : input.outputPerformance) === true) {
|
|
76443
|
+
process.stderr.write(", " + (Date.now() - start) + "ms\n");
|
|
76444
|
+
}
|
|
76294
76445
|
rulePerformance[rule.getMetadata().key] = 0;
|
|
76295
76446
|
}
|
|
76296
76447
|
(_e = input === null || input === void 0 ? void 0 : input.progress) === null || _e === void 0 ? void 0 : _e.set(check.length, "Finding Issues");
|
|
@@ -76706,6 +76857,7 @@ const _abap_object_1 = __webpack_require__(/*! ../objects/_abap_object */ "./nod
|
|
|
76706
76857
|
const severity_1 = __webpack_require__(/*! ../severity */ "./node_modules/@abaplint/core/build/src/severity.js");
|
|
76707
76858
|
// todo, check for cycles/circular dependencies, method findTop
|
|
76708
76859
|
// todo, add configurable error for multiple use includes
|
|
76860
|
+
const FMXXINCLUDE = /^(\/\w+\/)?L.+XX$/;
|
|
76709
76861
|
function getABAPObjects(reg) {
|
|
76710
76862
|
const ret = [];
|
|
76711
76863
|
for (const o of reg.getObjects()) {
|
|
@@ -76717,40 +76869,35 @@ function getABAPObjects(reg) {
|
|
|
76717
76869
|
}
|
|
76718
76870
|
class Graph {
|
|
76719
76871
|
constructor() {
|
|
76720
|
-
this.
|
|
76721
|
-
this.
|
|
76872
|
+
this.verticesIncludenameIndex = {};
|
|
76873
|
+
this.verticesFilenameIndex = {};
|
|
76874
|
+
this.edges = {};
|
|
76722
76875
|
}
|
|
76723
76876
|
addVertex(vertex) {
|
|
76724
|
-
|
|
76725
|
-
|
|
76726
|
-
findInclude(includeName) {
|
|
76727
|
-
for (const v of this.vertices) {
|
|
76728
|
-
if (v.includeName.toUpperCase() === includeName.toUpperCase()) {
|
|
76729
|
-
return v;
|
|
76730
|
-
}
|
|
76877
|
+
if (vertex.includeName !== undefined) {
|
|
76878
|
+
this.verticesIncludenameIndex[vertex.includeName.toUpperCase()] = vertex;
|
|
76731
76879
|
}
|
|
76732
|
-
|
|
76880
|
+
this.verticesFilenameIndex[vertex.filename.toUpperCase()] = vertex;
|
|
76733
76881
|
}
|
|
76734
|
-
|
|
76735
|
-
|
|
76736
|
-
|
|
76737
|
-
|
|
76738
|
-
|
|
76739
|
-
}
|
|
76740
|
-
return undefined;
|
|
76882
|
+
findVertexViaIncludename(includeName) {
|
|
76883
|
+
return this.verticesIncludenameIndex[includeName.toUpperCase()];
|
|
76884
|
+
}
|
|
76885
|
+
findVertexByFilename(filename) {
|
|
76886
|
+
return this.verticesFilenameIndex[filename.toUpperCase()];
|
|
76741
76887
|
}
|
|
76742
76888
|
addEdge(from, toFilename) {
|
|
76743
|
-
this.edges
|
|
76889
|
+
if (this.edges[from.filename] === undefined) {
|
|
76890
|
+
this.edges[from.filename] = [];
|
|
76891
|
+
}
|
|
76892
|
+
this.edges[from.filename].push(toFilename);
|
|
76744
76893
|
}
|
|
76745
76894
|
findTop(filename) {
|
|
76746
76895
|
const ret = [];
|
|
76747
|
-
for (const
|
|
76748
|
-
|
|
76749
|
-
ret.push(...this.findTop(e.to));
|
|
76750
|
-
}
|
|
76896
|
+
for (const to of this.edges[filename] || []) {
|
|
76897
|
+
ret.push(...this.findTop(to));
|
|
76751
76898
|
}
|
|
76752
76899
|
if (ret.length === 0) {
|
|
76753
|
-
const found = this.
|
|
76900
|
+
const found = this.findVertexByFilename(filename);
|
|
76754
76901
|
if (found !== undefined) {
|
|
76755
76902
|
ret.push(found);
|
|
76756
76903
|
}
|
|
@@ -76765,9 +76912,6 @@ class IncludeGraph {
|
|
|
76765
76912
|
this.graph = new Graph();
|
|
76766
76913
|
this.build();
|
|
76767
76914
|
}
|
|
76768
|
-
getIssues() {
|
|
76769
|
-
return this.issues;
|
|
76770
|
-
}
|
|
76771
76915
|
listMainForInclude(filename) {
|
|
76772
76916
|
const ret = [];
|
|
76773
76917
|
if (filename === undefined) {
|
|
@@ -76787,6 +76931,17 @@ class IncludeGraph {
|
|
|
76787
76931
|
ret.push(i);
|
|
76788
76932
|
}
|
|
76789
76933
|
}
|
|
76934
|
+
const v = this.graph.findVertexByFilename(file.getFilename());
|
|
76935
|
+
if (v !== undefined
|
|
76936
|
+
&& v.include === true
|
|
76937
|
+
&& this.listMainForInclude(v.filename).length === 0) {
|
|
76938
|
+
const f = this.reg.getFileByName(v.filename);
|
|
76939
|
+
if (f === undefined) {
|
|
76940
|
+
throw new Error("findUnusedIncludes internal error");
|
|
76941
|
+
}
|
|
76942
|
+
const issue = issue_1.Issue.atPosition(f, new position_1.Position(1, 1), "INCLUDE not used anywhere", new check_include_1.CheckInclude().getMetadata().key, severity_1.Severity.Error);
|
|
76943
|
+
ret.push(issue);
|
|
76944
|
+
}
|
|
76790
76945
|
return ret;
|
|
76791
76946
|
}
|
|
76792
76947
|
///////////////////////////////
|
|
@@ -76794,19 +76949,23 @@ class IncludeGraph {
|
|
|
76794
76949
|
this.addVertices();
|
|
76795
76950
|
for (const o of getABAPObjects(this.reg)) {
|
|
76796
76951
|
for (const f of o.getABAPFiles()) {
|
|
76952
|
+
if (f.getFilename().includes(".prog.screen_") || f.getFilename().includes(".fugr.screen_")) {
|
|
76953
|
+
// skip dynpro files
|
|
76954
|
+
continue;
|
|
76955
|
+
}
|
|
76797
76956
|
for (const s of f.getStatements()) {
|
|
76798
76957
|
if (s.get() instanceof statements_1.Include) {
|
|
76799
|
-
const ifFound = s.concatTokens().toUpperCase().includes("IF FOUND");
|
|
76800
76958
|
const iexp = s.findFirstExpression(expressions_1.IncludeName);
|
|
76801
76959
|
if (iexp === undefined) {
|
|
76802
76960
|
throw new Error("unexpected Include node");
|
|
76803
76961
|
}
|
|
76804
76962
|
const name = iexp.getFirstToken().getStr().toUpperCase();
|
|
76805
|
-
if (name.match(
|
|
76963
|
+
if (name.match(FMXXINCLUDE)) { // function module XX includes, possibily namespaced
|
|
76806
76964
|
continue;
|
|
76807
76965
|
}
|
|
76808
|
-
const found = this.graph.
|
|
76966
|
+
const found = this.graph.findVertexViaIncludename(name);
|
|
76809
76967
|
if (found === undefined) {
|
|
76968
|
+
const ifFound = s.concatTokens().toUpperCase().includes("IF FOUND");
|
|
76810
76969
|
if (ifFound === false) {
|
|
76811
76970
|
const issue = issue_1.Issue.atStatement(f, s, "Include " + name + " not found", new check_include_1.CheckInclude().getMetadata().key, severity_1.Severity.Error);
|
|
76812
76971
|
this.issues.push(issue);
|
|
@@ -76823,21 +76982,6 @@ class IncludeGraph {
|
|
|
76823
76982
|
}
|
|
76824
76983
|
}
|
|
76825
76984
|
}
|
|
76826
|
-
this.findUnusedIncludes();
|
|
76827
|
-
}
|
|
76828
|
-
findUnusedIncludes() {
|
|
76829
|
-
for (const v of this.graph.vertices) {
|
|
76830
|
-
if (v.include === true) {
|
|
76831
|
-
if (this.listMainForInclude(v.filename).length === 0) {
|
|
76832
|
-
const f = this.reg.getFileByName(v.filename);
|
|
76833
|
-
if (f === undefined) {
|
|
76834
|
-
throw new Error("findUnusedIncludes internal error");
|
|
76835
|
-
}
|
|
76836
|
-
const issue = issue_1.Issue.atPosition(f, new position_1.Position(1, 1), "INCLUDE not used anywhere", new check_include_1.CheckInclude().getMetadata().key, severity_1.Severity.Error);
|
|
76837
|
-
this.issues.push(issue);
|
|
76838
|
-
}
|
|
76839
|
-
}
|
|
76840
|
-
}
|
|
76841
76985
|
}
|
|
76842
76986
|
addVertices() {
|
|
76843
76987
|
for (const o of getABAPObjects(this.reg)) {
|
|
@@ -76856,7 +77000,7 @@ class IncludeGraph {
|
|
|
76856
77000
|
if (file) {
|
|
76857
77001
|
this.graph.addVertex({
|
|
76858
77002
|
filename: file.getFilename(),
|
|
76859
|
-
includeName:
|
|
77003
|
+
includeName: undefined,
|
|
76860
77004
|
include: false
|
|
76861
77005
|
});
|
|
76862
77006
|
}
|
|
@@ -76865,7 +77009,7 @@ class IncludeGraph {
|
|
|
76865
77009
|
for (const f of o.getSequencedFiles()) {
|
|
76866
77010
|
this.graph.addVertex({
|
|
76867
77011
|
filename: f.getFilename(),
|
|
76868
|
-
includeName:
|
|
77012
|
+
includeName: undefined,
|
|
76869
77013
|
include: false
|
|
76870
77014
|
});
|
|
76871
77015
|
}
|
|
@@ -76882,7 +77026,7 @@ class IncludeGraph {
|
|
|
76882
77026
|
if (file) {
|
|
76883
77027
|
this.graph.addVertex({
|
|
76884
77028
|
filename: file.getFilename(),
|
|
76885
|
-
includeName:
|
|
77029
|
+
includeName: undefined, // this is the SAPL program
|
|
76886
77030
|
include: false
|
|
76887
77031
|
});
|
|
76888
77032
|
}
|
|
@@ -79004,7 +79148,6 @@ const core_1 = __webpack_require__(/*! @abaplint/core */ "./node_modules/@abapli
|
|
|
79004
79148
|
const traversal_1 = __webpack_require__(/*! ../traversal */ "./node_modules/@abaplint/transpiler/build/src/traversal.js");
|
|
79005
79149
|
const method_call_param_1 = __webpack_require__(/*! ./method_call_param */ "./node_modules/@abaplint/transpiler/build/src/expressions/method_call_param.js");
|
|
79006
79150
|
const chunk_1 = __webpack_require__(/*! ../chunk */ "./node_modules/@abaplint/transpiler/build/src/chunk.js");
|
|
79007
|
-
const feature_flags_1 = __webpack_require__(/*! ../feature_flags */ "./node_modules/@abaplint/transpiler/build/src/feature_flags.js");
|
|
79008
79151
|
class MethodCallTranspiler {
|
|
79009
79152
|
transpile(node, traversal) {
|
|
79010
79153
|
const nameToken = node.findDirectExpression(core_1.Expressions.MethodName)?.getFirstToken();
|
|
@@ -79022,8 +79165,7 @@ class MethodCallTranspiler {
|
|
|
79022
79165
|
name = m.name.toLowerCase();
|
|
79023
79166
|
}
|
|
79024
79167
|
name = traversal_1.Traversal.escapeNamespace(name.replace("~", "$"));
|
|
79025
|
-
if (
|
|
79026
|
-
&& m?.def.getVisibility() === core_1.Visibility.Private
|
|
79168
|
+
if (m?.def.getVisibility() === core_1.Visibility.Private
|
|
79027
79169
|
&& m.def.isStatic() === false) {
|
|
79028
79170
|
const id = scope?.getParent()?.getParent()?.getIdentifier();
|
|
79029
79171
|
if (id?.stype === core_1.ScopeType.ClassImplementation
|
|
@@ -80669,23 +80811,6 @@ exports.TargetTranspiler = TargetTranspiler;
|
|
|
80669
80811
|
|
|
80670
80812
|
/***/ }),
|
|
80671
80813
|
|
|
80672
|
-
/***/ "./node_modules/@abaplint/transpiler/build/src/feature_flags.js":
|
|
80673
|
-
/*!**********************************************************************!*\
|
|
80674
|
-
!*** ./node_modules/@abaplint/transpiler/build/src/feature_flags.js ***!
|
|
80675
|
-
\**********************************************************************/
|
|
80676
|
-
/***/ ((__unused_webpack_module, exports) => {
|
|
80677
|
-
|
|
80678
|
-
"use strict";
|
|
80679
|
-
|
|
80680
|
-
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
80681
|
-
exports.FEATURE_FLAGS = void 0;
|
|
80682
|
-
exports.FEATURE_FLAGS = {
|
|
80683
|
-
private: true,
|
|
80684
|
-
};
|
|
80685
|
-
//# sourceMappingURL=feature_flags.js.map
|
|
80686
|
-
|
|
80687
|
-
/***/ }),
|
|
80688
|
-
|
|
80689
80814
|
/***/ "./node_modules/@abaplint/transpiler/build/src/handlers/handle_abap.js":
|
|
80690
80815
|
/*!*****************************************************************************!*\
|
|
80691
80816
|
!*** ./node_modules/@abaplint/transpiler/build/src/handlers/handle_abap.js ***!
|
|
@@ -82262,7 +82387,6 @@ exports.CallTranspiler = void 0;
|
|
|
82262
82387
|
const abaplint = __webpack_require__(/*! @abaplint/core */ "./node_modules/@abaplint/core/build/src/index.js");
|
|
82263
82388
|
const chunk_1 = __webpack_require__(/*! ../chunk */ "./node_modules/@abaplint/transpiler/build/src/chunk.js");
|
|
82264
82389
|
const expressions_1 = __webpack_require__(/*! ../expressions */ "./node_modules/@abaplint/transpiler/build/src/expressions/index.js");
|
|
82265
|
-
const feature_flags_1 = __webpack_require__(/*! ../feature_flags */ "./node_modules/@abaplint/transpiler/build/src/feature_flags.js");
|
|
82266
82390
|
class CallTranspiler {
|
|
82267
82391
|
transpile(node, traversal) {
|
|
82268
82392
|
const chain = node.findDirectExpression(abaplint.Expressions.MethodCallChain);
|
|
@@ -82325,8 +82449,7 @@ class CallTranspiler {
|
|
|
82325
82449
|
}
|
|
82326
82450
|
if (nameToken) {
|
|
82327
82451
|
const scope = traversal.findCurrentScopeByToken(nameToken);
|
|
82328
|
-
if (
|
|
82329
|
-
&& m?.def.getVisibility() === abaplint.Visibility.Private
|
|
82452
|
+
if (m?.def.getVisibility() === abaplint.Visibility.Private
|
|
82330
82453
|
&& m.def.isStatic() === false) {
|
|
82331
82454
|
const id = scope?.getParent()?.getParent()?.getIdentifier();
|
|
82332
82455
|
if (id?.stype === abaplint.ScopeType.ClassImplementation
|
|
@@ -85348,7 +85471,6 @@ const traversal_1 = __webpack_require__(/*! ../traversal */ "./node_modules/@aba
|
|
|
85348
85471
|
const expressions_1 = __webpack_require__(/*! ../expressions */ "./node_modules/@abaplint/transpiler/build/src/expressions/index.js");
|
|
85349
85472
|
const chunk_1 = __webpack_require__(/*! ../chunk */ "./node_modules/@abaplint/transpiler/build/src/chunk.js");
|
|
85350
85473
|
const unique_identifier_1 = __webpack_require__(/*! ../unique_identifier */ "./node_modules/@abaplint/transpiler/build/src/unique_identifier.js");
|
|
85351
|
-
const feature_flags_1 = __webpack_require__(/*! ../feature_flags */ "./node_modules/@abaplint/transpiler/build/src/feature_flags.js");
|
|
85352
85474
|
class MethodImplementationTranspiler {
|
|
85353
85475
|
transpile(node, traversal) {
|
|
85354
85476
|
const token = node.findFirstExpression(abaplint.Expressions.MethodName).getFirstToken();
|
|
@@ -85459,8 +85581,7 @@ class MethodImplementationTranspiler {
|
|
|
85459
85581
|
}
|
|
85460
85582
|
// https://github.com/tc39/proposal-class-fields
|
|
85461
85583
|
let isPrivate = "";
|
|
85462
|
-
if (
|
|
85463
|
-
&& method?.getVisibility() === abaplint.Visibility.Private
|
|
85584
|
+
if (method?.getVisibility() === abaplint.Visibility.Private
|
|
85464
85585
|
&& method.isStatic() === false) {
|
|
85465
85586
|
isPrivate = "#";
|
|
85466
85587
|
}
|
|
@@ -86071,7 +86192,7 @@ const chunk_1 = __webpack_require__(/*! ../chunk */ "./node_modules/@abaplint/tr
|
|
|
86071
86192
|
const transpile_types_1 = __webpack_require__(/*! ../transpile_types */ "./node_modules/@abaplint/transpiler/build/src/transpile_types.js");
|
|
86072
86193
|
class RangesTranspiler {
|
|
86073
86194
|
transpile(node, traversal) {
|
|
86074
|
-
const token = node.findFirstExpression(abaplint.Expressions.
|
|
86195
|
+
const token = node.findFirstExpression(abaplint.Expressions.DefinitionName)?.getFirstToken();
|
|
86075
86196
|
if (token === undefined) {
|
|
86076
86197
|
throw new Error("RangesTranspiler, token not found");
|
|
86077
86198
|
}
|
|
@@ -89180,7 +89301,6 @@ const transpile_types_1 = __webpack_require__(/*! ./transpile_types */ "./node_m
|
|
|
89180
89301
|
const chunk_1 = __webpack_require__(/*! ./chunk */ "./node_modules/@abaplint/transpiler/build/src/chunk.js");
|
|
89181
89302
|
const expressions_1 = __webpack_require__(/*! ./expressions */ "./node_modules/@abaplint/transpiler/build/src/expressions/index.js");
|
|
89182
89303
|
const keywords_1 = __webpack_require__(/*! ./keywords */ "./node_modules/@abaplint/transpiler/build/src/keywords.js");
|
|
89183
|
-
const feature_flags_1 = __webpack_require__(/*! ./feature_flags */ "./node_modules/@abaplint/transpiler/build/src/feature_flags.js");
|
|
89184
89304
|
class Traversal {
|
|
89185
89305
|
constructor(spaghetti, file, obj, reg, options) {
|
|
89186
89306
|
this.scopeCache = undefined;
|
|
@@ -89574,7 +89694,7 @@ class Traversal {
|
|
|
89574
89694
|
continue;
|
|
89575
89695
|
}
|
|
89576
89696
|
let privateHash = "";
|
|
89577
|
-
if (
|
|
89697
|
+
if (a.getVisibility() === abaplint.Visibility.Private) {
|
|
89578
89698
|
privateHash = "#";
|
|
89579
89699
|
}
|
|
89580
89700
|
const methodName = privateHash + Traversal.escapeNamespace(name.replace("~", "$"));
|
|
@@ -90189,6 +90309,7 @@ exports.config = {
|
|
|
90189
90309
|
"parser_error": true,
|
|
90190
90310
|
"allowed_object_types": {
|
|
90191
90311
|
"allowed": [
|
|
90312
|
+
"APIS",
|
|
90192
90313
|
"AUTH",
|
|
90193
90314
|
"CLAS",
|
|
90194
90315
|
"DEVC",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abaplint/transpiler-cli",
|
|
3
|
-
"version": "2.10.
|
|
3
|
+
"version": "2.10.66",
|
|
4
4
|
"description": "Transpiler - Command Line Interface",
|
|
5
5
|
"funding": "https://github.com/sponsors/larshp",
|
|
6
6
|
"bin": {
|
|
@@ -27,10 +27,10 @@
|
|
|
27
27
|
"author": "abaplint",
|
|
28
28
|
"license": "MIT",
|
|
29
29
|
"devDependencies": {
|
|
30
|
-
"@abaplint/core": "^2.113.
|
|
31
|
-
"@abaplint/transpiler": "^2.10.
|
|
30
|
+
"@abaplint/core": "^2.113.149",
|
|
31
|
+
"@abaplint/transpiler": "^2.10.66",
|
|
32
32
|
"@types/glob": "^8.1.0",
|
|
33
|
-
"@types/node": "^22.16.
|
|
33
|
+
"@types/node": "^22.16.5",
|
|
34
34
|
"@types/progress": "^2.0.7",
|
|
35
35
|
"glob": "=7.2.0",
|
|
36
36
|
"progress": "^2.0.3",
|
|
@@ -38,6 +38,6 @@
|
|
|
38
38
|
"typescript": "^5.8.3",
|
|
39
39
|
"p-limit": "^3.1.0",
|
|
40
40
|
"webpack-cli": "^6.0.1",
|
|
41
|
-
"webpack": "^5.
|
|
41
|
+
"webpack": "^5.100.2"
|
|
42
42
|
}
|
|
43
43
|
}
|