@abaplint/transpiler-cli 2.10.64 → 2.10.65
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 +225 -108
- 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;
|
|
@@ -47987,12 +48085,14 @@ class FunctionGroup extends _abap_object_1.ABAPObject {
|
|
|
47987
48085
|
}
|
|
47988
48086
|
if ((i.startsWith("L") || namespaced) && f.getFilename().includes(search.toLowerCase() + ".")) {
|
|
47989
48087
|
ret.push({ file: f, name: i });
|
|
48088
|
+
break;
|
|
47990
48089
|
}
|
|
47991
48090
|
// fix for URL encoded? Uris
|
|
47992
48091
|
if (namespaced) {
|
|
47993
48092
|
search = i.replace(/\//g, "%23");
|
|
47994
48093
|
if (f.getFilename().includes(search.toLowerCase() + ".")) {
|
|
47995
48094
|
ret.push({ file: f, name: i });
|
|
48095
|
+
break;
|
|
47996
48096
|
}
|
|
47997
48097
|
}
|
|
47998
48098
|
}
|
|
@@ -53474,14 +53574,14 @@ class Registry {
|
|
|
53474
53574
|
this.objects = {};
|
|
53475
53575
|
this.objectsByType = {};
|
|
53476
53576
|
this.dependencies = {};
|
|
53477
|
-
this.conf
|
|
53577
|
+
this.setConfig(conf ? conf : config_1.Config.getDefault());
|
|
53478
53578
|
this.ddicReferences = new ddic_references_1.DDICReferences();
|
|
53479
53579
|
this.msagReferences = new msag_references_1.MSAGReferences();
|
|
53480
53580
|
this.macroReferences = new macro_references_1.MacroReferences();
|
|
53481
53581
|
}
|
|
53482
53582
|
static abaplintVersion() {
|
|
53483
53583
|
// magic, see build script "version.sh"
|
|
53484
|
-
return "2.113.
|
|
53584
|
+
return "2.113.148";
|
|
53485
53585
|
}
|
|
53486
53586
|
getDDICReferences() {
|
|
53487
53587
|
return this.ddicReferences;
|
|
@@ -53559,12 +53659,11 @@ class Registry {
|
|
|
53559
53659
|
obj.setDirty();
|
|
53560
53660
|
}
|
|
53561
53661
|
this.conf = conf;
|
|
53662
|
+
this.errorNamespace = new RegExp(this.getConfig().getSyntaxSetttings().errorNamespace, "i");
|
|
53562
53663
|
return this;
|
|
53563
53664
|
}
|
|
53564
53665
|
inErrorNamespace(name) {
|
|
53565
|
-
|
|
53566
|
-
const reg = new RegExp(this.getConfig().getSyntaxSetttings().errorNamespace, "i");
|
|
53567
|
-
return reg.test(name);
|
|
53666
|
+
return this.errorNamespace.test(name);
|
|
53568
53667
|
}
|
|
53569
53668
|
addFile(file) {
|
|
53570
53669
|
return this.addFiles([file]);
|
|
@@ -69860,15 +69959,20 @@ This rule makes sure the spaces are consistently required across the language.`,
|
|
|
69860
69959
|
return undefined;
|
|
69861
69960
|
}
|
|
69862
69961
|
checkSource(cond) {
|
|
69962
|
+
var _a, _b;
|
|
69863
69963
|
const children = cond.getAllTokens();
|
|
69864
69964
|
if (children.length < 2) {
|
|
69865
69965
|
return undefined;
|
|
69866
69966
|
}
|
|
69867
69967
|
if (children.length >= 4
|
|
69868
69968
|
&& children[0].getStr().toUpperCase() === "CONV") {
|
|
69869
|
-
const
|
|
69870
|
-
const
|
|
69871
|
-
|
|
69969
|
+
const directChildren = cond.getChildren();
|
|
69970
|
+
const first = (_a = directChildren[2]) === null || _a === void 0 ? void 0 : _a.getLastToken();
|
|
69971
|
+
const second = (_b = directChildren[3]) === null || _b === void 0 ? void 0 : _b.getFirstToken();
|
|
69972
|
+
if (first
|
|
69973
|
+
&& first.getStr() === "("
|
|
69974
|
+
&& second
|
|
69975
|
+
&& first.getRow() === second.getRow()
|
|
69872
69976
|
&& first.getCol() + 1 === second.getStart().getCol()) {
|
|
69873
69977
|
return second.getStart();
|
|
69874
69978
|
}
|
|
@@ -76254,9 +76358,35 @@ const artifacts_rules_1 = __webpack_require__(/*! ./artifacts_rules */ "./node_m
|
|
|
76254
76358
|
const _abap_object_1 = __webpack_require__(/*! ./objects/_abap_object */ "./node_modules/@abaplint/core/build/src/objects/_abap_object.js");
|
|
76255
76359
|
const skip_logic_1 = __webpack_require__(/*! ./skip_logic */ "./node_modules/@abaplint/core/build/src/skip_logic.js");
|
|
76256
76360
|
const excludeHelper_1 = __webpack_require__(/*! ./utils/excludeHelper */ "./node_modules/@abaplint/core/build/src/utils/excludeHelper.js");
|
|
76361
|
+
class SyntaxPerformance {
|
|
76362
|
+
constructor() {
|
|
76363
|
+
this.results = [];
|
|
76364
|
+
}
|
|
76365
|
+
push(obj, runtime) {
|
|
76366
|
+
if (runtime < 100) {
|
|
76367
|
+
return;
|
|
76368
|
+
}
|
|
76369
|
+
this.results.push({
|
|
76370
|
+
runtime: runtime,
|
|
76371
|
+
name: obj.getType() + " " + obj.getName(),
|
|
76372
|
+
});
|
|
76373
|
+
}
|
|
76374
|
+
output() {
|
|
76375
|
+
const MAX = 10;
|
|
76376
|
+
this.results.sort((a, b) => { return b.runtime - a.runtime; });
|
|
76377
|
+
for (let i = 0; i < MAX; i++) {
|
|
76378
|
+
const row = this.results[i];
|
|
76379
|
+
if (row === undefined) {
|
|
76380
|
+
break;
|
|
76381
|
+
}
|
|
76382
|
+
process.stderr.write(`\t${row.runtime}ms\t${row.name}\n`);
|
|
76383
|
+
}
|
|
76384
|
+
}
|
|
76385
|
+
}
|
|
76257
76386
|
class RulesRunner {
|
|
76258
76387
|
constructor(reg) {
|
|
76259
76388
|
this.reg = reg;
|
|
76389
|
+
this.syntaxPerformance = new SyntaxPerformance();
|
|
76260
76390
|
}
|
|
76261
76391
|
objectsToCheck(objects) {
|
|
76262
76392
|
const check = [];
|
|
@@ -76281,16 +76411,33 @@ class RulesRunner {
|
|
|
76281
76411
|
for (const obj of check) {
|
|
76282
76412
|
(_b = input === null || input === void 0 ? void 0 : input.progress) === null || _b === void 0 ? void 0 : _b.tick("Run Syntax - " + obj.getName());
|
|
76283
76413
|
if (obj instanceof _abap_object_1.ABAPObject) {
|
|
76414
|
+
const start = Date.now();
|
|
76284
76415
|
new syntax_1.SyntaxLogic(this.reg, obj).run();
|
|
76416
|
+
if ((input === null || input === void 0 ? void 0 : input.outputPerformance) === true) {
|
|
76417
|
+
this.syntaxPerformance.push(obj, Date.now() - start);
|
|
76418
|
+
}
|
|
76285
76419
|
}
|
|
76286
76420
|
}
|
|
76421
|
+
if ((input === null || input === void 0 ? void 0 : input.outputPerformance) === true) {
|
|
76422
|
+
process.stderr.write("Syntax Performance:\n");
|
|
76423
|
+
this.syntaxPerformance.output();
|
|
76424
|
+
}
|
|
76287
76425
|
(_c = input === null || input === void 0 ? void 0 : input.progress) === null || _c === void 0 ? void 0 : _c.set(rules.length, "Initialize Rules");
|
|
76288
76426
|
for (const rule of rules) {
|
|
76289
|
-
|
|
76427
|
+
const start = Date.now();
|
|
76428
|
+
if ((input === null || input === void 0 ? void 0 : input.outputPerformance) === true) {
|
|
76429
|
+
process.stderr.write("Initializing rule " + rule.getMetadata().key);
|
|
76430
|
+
}
|
|
76431
|
+
else {
|
|
76432
|
+
(_d = input === null || input === void 0 ? void 0 : input.progress) === null || _d === void 0 ? void 0 : _d.tick("Initialize Rules - " + rule.getMetadata().key);
|
|
76433
|
+
}
|
|
76290
76434
|
if (rule.initialize === undefined) {
|
|
76291
76435
|
throw new Error(rule.getMetadata().key + " missing initialize method");
|
|
76292
76436
|
}
|
|
76293
76437
|
rule.initialize(this.reg);
|
|
76438
|
+
if ((input === null || input === void 0 ? void 0 : input.outputPerformance) === true) {
|
|
76439
|
+
process.stderr.write(", " + (Date.now() - start) + "ms\n");
|
|
76440
|
+
}
|
|
76294
76441
|
rulePerformance[rule.getMetadata().key] = 0;
|
|
76295
76442
|
}
|
|
76296
76443
|
(_e = input === null || input === void 0 ? void 0 : input.progress) === null || _e === void 0 ? void 0 : _e.set(check.length, "Finding Issues");
|
|
@@ -76706,6 +76853,7 @@ const _abap_object_1 = __webpack_require__(/*! ../objects/_abap_object */ "./nod
|
|
|
76706
76853
|
const severity_1 = __webpack_require__(/*! ../severity */ "./node_modules/@abaplint/core/build/src/severity.js");
|
|
76707
76854
|
// todo, check for cycles/circular dependencies, method findTop
|
|
76708
76855
|
// todo, add configurable error for multiple use includes
|
|
76856
|
+
const FMXXINCLUDE = /^(\/\w+\/)?L.+XX$/;
|
|
76709
76857
|
function getABAPObjects(reg) {
|
|
76710
76858
|
const ret = [];
|
|
76711
76859
|
for (const o of reg.getObjects()) {
|
|
@@ -76717,40 +76865,35 @@ function getABAPObjects(reg) {
|
|
|
76717
76865
|
}
|
|
76718
76866
|
class Graph {
|
|
76719
76867
|
constructor() {
|
|
76720
|
-
this.
|
|
76721
|
-
this.
|
|
76868
|
+
this.verticesIncludenameIndex = {};
|
|
76869
|
+
this.verticesFilenameIndex = {};
|
|
76870
|
+
this.edges = {};
|
|
76722
76871
|
}
|
|
76723
76872
|
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
|
-
}
|
|
76873
|
+
if (vertex.includeName !== undefined) {
|
|
76874
|
+
this.verticesIncludenameIndex[vertex.includeName.toUpperCase()] = vertex;
|
|
76731
76875
|
}
|
|
76732
|
-
|
|
76876
|
+
this.verticesFilenameIndex[vertex.filename.toUpperCase()] = vertex;
|
|
76733
76877
|
}
|
|
76734
|
-
|
|
76735
|
-
|
|
76736
|
-
|
|
76737
|
-
|
|
76738
|
-
|
|
76739
|
-
}
|
|
76740
|
-
return undefined;
|
|
76878
|
+
findVertexViaIncludename(includeName) {
|
|
76879
|
+
return this.verticesIncludenameIndex[includeName.toUpperCase()];
|
|
76880
|
+
}
|
|
76881
|
+
findVertexByFilename(filename) {
|
|
76882
|
+
return this.verticesFilenameIndex[filename.toUpperCase()];
|
|
76741
76883
|
}
|
|
76742
76884
|
addEdge(from, toFilename) {
|
|
76743
|
-
this.edges
|
|
76885
|
+
if (this.edges[from.filename] === undefined) {
|
|
76886
|
+
this.edges[from.filename] = [];
|
|
76887
|
+
}
|
|
76888
|
+
this.edges[from.filename].push(toFilename);
|
|
76744
76889
|
}
|
|
76745
76890
|
findTop(filename) {
|
|
76746
76891
|
const ret = [];
|
|
76747
|
-
for (const
|
|
76748
|
-
|
|
76749
|
-
ret.push(...this.findTop(e.to));
|
|
76750
|
-
}
|
|
76892
|
+
for (const to of this.edges[filename] || []) {
|
|
76893
|
+
ret.push(...this.findTop(to));
|
|
76751
76894
|
}
|
|
76752
76895
|
if (ret.length === 0) {
|
|
76753
|
-
const found = this.
|
|
76896
|
+
const found = this.findVertexByFilename(filename);
|
|
76754
76897
|
if (found !== undefined) {
|
|
76755
76898
|
ret.push(found);
|
|
76756
76899
|
}
|
|
@@ -76765,9 +76908,6 @@ class IncludeGraph {
|
|
|
76765
76908
|
this.graph = new Graph();
|
|
76766
76909
|
this.build();
|
|
76767
76910
|
}
|
|
76768
|
-
getIssues() {
|
|
76769
|
-
return this.issues;
|
|
76770
|
-
}
|
|
76771
76911
|
listMainForInclude(filename) {
|
|
76772
76912
|
const ret = [];
|
|
76773
76913
|
if (filename === undefined) {
|
|
@@ -76787,6 +76927,17 @@ class IncludeGraph {
|
|
|
76787
76927
|
ret.push(i);
|
|
76788
76928
|
}
|
|
76789
76929
|
}
|
|
76930
|
+
const v = this.graph.findVertexByFilename(file.getFilename());
|
|
76931
|
+
if (v !== undefined
|
|
76932
|
+
&& v.include === true
|
|
76933
|
+
&& this.listMainForInclude(v.filename).length === 0) {
|
|
76934
|
+
const f = this.reg.getFileByName(v.filename);
|
|
76935
|
+
if (f === undefined) {
|
|
76936
|
+
throw new Error("findUnusedIncludes internal error");
|
|
76937
|
+
}
|
|
76938
|
+
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);
|
|
76939
|
+
ret.push(issue);
|
|
76940
|
+
}
|
|
76790
76941
|
return ret;
|
|
76791
76942
|
}
|
|
76792
76943
|
///////////////////////////////
|
|
@@ -76794,19 +76945,23 @@ class IncludeGraph {
|
|
|
76794
76945
|
this.addVertices();
|
|
76795
76946
|
for (const o of getABAPObjects(this.reg)) {
|
|
76796
76947
|
for (const f of o.getABAPFiles()) {
|
|
76948
|
+
if (f.getFilename().includes(".prog.screen_") || f.getFilename().includes(".fugr.screen_")) {
|
|
76949
|
+
// skip dynpro files
|
|
76950
|
+
continue;
|
|
76951
|
+
}
|
|
76797
76952
|
for (const s of f.getStatements()) {
|
|
76798
76953
|
if (s.get() instanceof statements_1.Include) {
|
|
76799
|
-
const ifFound = s.concatTokens().toUpperCase().includes("IF FOUND");
|
|
76800
76954
|
const iexp = s.findFirstExpression(expressions_1.IncludeName);
|
|
76801
76955
|
if (iexp === undefined) {
|
|
76802
76956
|
throw new Error("unexpected Include node");
|
|
76803
76957
|
}
|
|
76804
76958
|
const name = iexp.getFirstToken().getStr().toUpperCase();
|
|
76805
|
-
if (name.match(
|
|
76959
|
+
if (name.match(FMXXINCLUDE)) { // function module XX includes, possibily namespaced
|
|
76806
76960
|
continue;
|
|
76807
76961
|
}
|
|
76808
|
-
const found = this.graph.
|
|
76962
|
+
const found = this.graph.findVertexViaIncludename(name);
|
|
76809
76963
|
if (found === undefined) {
|
|
76964
|
+
const ifFound = s.concatTokens().toUpperCase().includes("IF FOUND");
|
|
76810
76965
|
if (ifFound === false) {
|
|
76811
76966
|
const issue = issue_1.Issue.atStatement(f, s, "Include " + name + " not found", new check_include_1.CheckInclude().getMetadata().key, severity_1.Severity.Error);
|
|
76812
76967
|
this.issues.push(issue);
|
|
@@ -76823,21 +76978,6 @@ class IncludeGraph {
|
|
|
76823
76978
|
}
|
|
76824
76979
|
}
|
|
76825
76980
|
}
|
|
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
76981
|
}
|
|
76842
76982
|
addVertices() {
|
|
76843
76983
|
for (const o of getABAPObjects(this.reg)) {
|
|
@@ -76856,7 +76996,7 @@ class IncludeGraph {
|
|
|
76856
76996
|
if (file) {
|
|
76857
76997
|
this.graph.addVertex({
|
|
76858
76998
|
filename: file.getFilename(),
|
|
76859
|
-
includeName:
|
|
76999
|
+
includeName: undefined,
|
|
76860
77000
|
include: false
|
|
76861
77001
|
});
|
|
76862
77002
|
}
|
|
@@ -76865,7 +77005,7 @@ class IncludeGraph {
|
|
|
76865
77005
|
for (const f of o.getSequencedFiles()) {
|
|
76866
77006
|
this.graph.addVertex({
|
|
76867
77007
|
filename: f.getFilename(),
|
|
76868
|
-
includeName:
|
|
77008
|
+
includeName: undefined,
|
|
76869
77009
|
include: false
|
|
76870
77010
|
});
|
|
76871
77011
|
}
|
|
@@ -76882,7 +77022,7 @@ class IncludeGraph {
|
|
|
76882
77022
|
if (file) {
|
|
76883
77023
|
this.graph.addVertex({
|
|
76884
77024
|
filename: file.getFilename(),
|
|
76885
|
-
includeName:
|
|
77025
|
+
includeName: undefined, // this is the SAPL program
|
|
76886
77026
|
include: false
|
|
76887
77027
|
});
|
|
76888
77028
|
}
|
|
@@ -79004,7 +79144,6 @@ const core_1 = __webpack_require__(/*! @abaplint/core */ "./node_modules/@abapli
|
|
|
79004
79144
|
const traversal_1 = __webpack_require__(/*! ../traversal */ "./node_modules/@abaplint/transpiler/build/src/traversal.js");
|
|
79005
79145
|
const method_call_param_1 = __webpack_require__(/*! ./method_call_param */ "./node_modules/@abaplint/transpiler/build/src/expressions/method_call_param.js");
|
|
79006
79146
|
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
79147
|
class MethodCallTranspiler {
|
|
79009
79148
|
transpile(node, traversal) {
|
|
79010
79149
|
const nameToken = node.findDirectExpression(core_1.Expressions.MethodName)?.getFirstToken();
|
|
@@ -79022,8 +79161,7 @@ class MethodCallTranspiler {
|
|
|
79022
79161
|
name = m.name.toLowerCase();
|
|
79023
79162
|
}
|
|
79024
79163
|
name = traversal_1.Traversal.escapeNamespace(name.replace("~", "$"));
|
|
79025
|
-
if (
|
|
79026
|
-
&& m?.def.getVisibility() === core_1.Visibility.Private
|
|
79164
|
+
if (m?.def.getVisibility() === core_1.Visibility.Private
|
|
79027
79165
|
&& m.def.isStatic() === false) {
|
|
79028
79166
|
const id = scope?.getParent()?.getParent()?.getIdentifier();
|
|
79029
79167
|
if (id?.stype === core_1.ScopeType.ClassImplementation
|
|
@@ -80669,23 +80807,6 @@ exports.TargetTranspiler = TargetTranspiler;
|
|
|
80669
80807
|
|
|
80670
80808
|
/***/ }),
|
|
80671
80809
|
|
|
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
80810
|
/***/ "./node_modules/@abaplint/transpiler/build/src/handlers/handle_abap.js":
|
|
80690
80811
|
/*!*****************************************************************************!*\
|
|
80691
80812
|
!*** ./node_modules/@abaplint/transpiler/build/src/handlers/handle_abap.js ***!
|
|
@@ -82262,7 +82383,6 @@ exports.CallTranspiler = void 0;
|
|
|
82262
82383
|
const abaplint = __webpack_require__(/*! @abaplint/core */ "./node_modules/@abaplint/core/build/src/index.js");
|
|
82263
82384
|
const chunk_1 = __webpack_require__(/*! ../chunk */ "./node_modules/@abaplint/transpiler/build/src/chunk.js");
|
|
82264
82385
|
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
82386
|
class CallTranspiler {
|
|
82267
82387
|
transpile(node, traversal) {
|
|
82268
82388
|
const chain = node.findDirectExpression(abaplint.Expressions.MethodCallChain);
|
|
@@ -82325,8 +82445,7 @@ class CallTranspiler {
|
|
|
82325
82445
|
}
|
|
82326
82446
|
if (nameToken) {
|
|
82327
82447
|
const scope = traversal.findCurrentScopeByToken(nameToken);
|
|
82328
|
-
if (
|
|
82329
|
-
&& m?.def.getVisibility() === abaplint.Visibility.Private
|
|
82448
|
+
if (m?.def.getVisibility() === abaplint.Visibility.Private
|
|
82330
82449
|
&& m.def.isStatic() === false) {
|
|
82331
82450
|
const id = scope?.getParent()?.getParent()?.getIdentifier();
|
|
82332
82451
|
if (id?.stype === abaplint.ScopeType.ClassImplementation
|
|
@@ -85348,7 +85467,6 @@ const traversal_1 = __webpack_require__(/*! ../traversal */ "./node_modules/@aba
|
|
|
85348
85467
|
const expressions_1 = __webpack_require__(/*! ../expressions */ "./node_modules/@abaplint/transpiler/build/src/expressions/index.js");
|
|
85349
85468
|
const chunk_1 = __webpack_require__(/*! ../chunk */ "./node_modules/@abaplint/transpiler/build/src/chunk.js");
|
|
85350
85469
|
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
85470
|
class MethodImplementationTranspiler {
|
|
85353
85471
|
transpile(node, traversal) {
|
|
85354
85472
|
const token = node.findFirstExpression(abaplint.Expressions.MethodName).getFirstToken();
|
|
@@ -85459,8 +85577,7 @@ class MethodImplementationTranspiler {
|
|
|
85459
85577
|
}
|
|
85460
85578
|
// https://github.com/tc39/proposal-class-fields
|
|
85461
85579
|
let isPrivate = "";
|
|
85462
|
-
if (
|
|
85463
|
-
&& method?.getVisibility() === abaplint.Visibility.Private
|
|
85580
|
+
if (method?.getVisibility() === abaplint.Visibility.Private
|
|
85464
85581
|
&& method.isStatic() === false) {
|
|
85465
85582
|
isPrivate = "#";
|
|
85466
85583
|
}
|
|
@@ -86071,7 +86188,7 @@ const chunk_1 = __webpack_require__(/*! ../chunk */ "./node_modules/@abaplint/tr
|
|
|
86071
86188
|
const transpile_types_1 = __webpack_require__(/*! ../transpile_types */ "./node_modules/@abaplint/transpiler/build/src/transpile_types.js");
|
|
86072
86189
|
class RangesTranspiler {
|
|
86073
86190
|
transpile(node, traversal) {
|
|
86074
|
-
const token = node.findFirstExpression(abaplint.Expressions.
|
|
86191
|
+
const token = node.findFirstExpression(abaplint.Expressions.DefinitionName)?.getFirstToken();
|
|
86075
86192
|
if (token === undefined) {
|
|
86076
86193
|
throw new Error("RangesTranspiler, token not found");
|
|
86077
86194
|
}
|
|
@@ -89180,7 +89297,6 @@ const transpile_types_1 = __webpack_require__(/*! ./transpile_types */ "./node_m
|
|
|
89180
89297
|
const chunk_1 = __webpack_require__(/*! ./chunk */ "./node_modules/@abaplint/transpiler/build/src/chunk.js");
|
|
89181
89298
|
const expressions_1 = __webpack_require__(/*! ./expressions */ "./node_modules/@abaplint/transpiler/build/src/expressions/index.js");
|
|
89182
89299
|
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
89300
|
class Traversal {
|
|
89185
89301
|
constructor(spaghetti, file, obj, reg, options) {
|
|
89186
89302
|
this.scopeCache = undefined;
|
|
@@ -89574,7 +89690,7 @@ class Traversal {
|
|
|
89574
89690
|
continue;
|
|
89575
89691
|
}
|
|
89576
89692
|
let privateHash = "";
|
|
89577
|
-
if (
|
|
89693
|
+
if (a.getVisibility() === abaplint.Visibility.Private) {
|
|
89578
89694
|
privateHash = "#";
|
|
89579
89695
|
}
|
|
89580
89696
|
const methodName = privateHash + Traversal.escapeNamespace(name.replace("~", "$"));
|
|
@@ -90189,6 +90305,7 @@ exports.config = {
|
|
|
90189
90305
|
"parser_error": true,
|
|
90190
90306
|
"allowed_object_types": {
|
|
90191
90307
|
"allowed": [
|
|
90308
|
+
"APIS",
|
|
90192
90309
|
"AUTH",
|
|
90193
90310
|
"CLAS",
|
|
90194
90311
|
"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.65",
|
|
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.148",
|
|
31
|
+
"@abaplint/transpiler": "^2.10.65",
|
|
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
|
}
|