@abaplint/transpiler-cli 2.12.2 → 2.12.4
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/abap_transpile +1 -1
- package/build/bundle.js +327 -118
- package/package.json +5 -5
package/abap_transpile
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
1
|
+
#!/usr/bin/env node
|
|
2
2
|
require("./build/bundle");
|
package/build/bundle.js
CHANGED
|
@@ -3447,9 +3447,11 @@ exports.ComponentCompareSimple = void 0;
|
|
|
3447
3447
|
const combi_1 = __webpack_require__(/*! ../combi */ "./node_modules/@abaplint/core/build/src/abap/2_statements/combi.js");
|
|
3448
3448
|
const _1 = __webpack_require__(/*! . */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js");
|
|
3449
3449
|
const component_chain_simple_1 = __webpack_require__(/*! ./component_chain_simple */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/component_chain_simple.js");
|
|
3450
|
+
const version_1 = __webpack_require__(/*! ../../../version */ "./node_modules/@abaplint/core/build/src/version.js");
|
|
3450
3451
|
class ComponentCompareSimple extends combi_1.Expression {
|
|
3451
3452
|
getRunnable() {
|
|
3452
|
-
const
|
|
3453
|
+
const source = (0, combi_1.altPrio)((0, combi_1.ver)(version_1.Version.v740sp02, _1.Source, version_1.Version.OpenABAP), _1.SimpleSource4);
|
|
3454
|
+
const ret = (0, combi_1.seq)((0, combi_1.altPrio)(component_chain_simple_1.ComponentChainSimple, _1.Dynamic), "=", source);
|
|
3453
3455
|
return (0, combi_1.plus)(ret);
|
|
3454
3456
|
}
|
|
3455
3457
|
}
|
|
@@ -4447,7 +4449,7 @@ const tokens_1 = __webpack_require__(/*! ../../1_lexer/tokens */ "./node_modules
|
|
|
4447
4449
|
class FormName extends combi_1.Expression {
|
|
4448
4450
|
getRunnable() {
|
|
4449
4451
|
// todo, does not handle namespaces properly
|
|
4450
|
-
return (0, combi_1.seq)((0, combi_1.regex)(/^!?[\w
|
|
4452
|
+
return (0, combi_1.seq)((0, combi_1.regex)(/^!?[\w%$\*\/\?<>]+$/), (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)));
|
|
4451
4453
|
}
|
|
4452
4454
|
}
|
|
4453
4455
|
exports.FormName = FormName;
|
|
@@ -4932,6 +4934,7 @@ __exportStar(__webpack_require__(/*! ./sql_arithmetic_operator */ "./node_module
|
|
|
4932
4934
|
__exportStar(__webpack_require__(/*! ./sql_arithmetics */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_arithmetics.js"), exports);
|
|
4933
4935
|
__exportStar(__webpack_require__(/*! ./sql_as_name */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_as_name.js"), exports);
|
|
4934
4936
|
__exportStar(__webpack_require__(/*! ./sql_case */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_case.js"), exports);
|
|
4937
|
+
__exportStar(__webpack_require__(/*! ./sql_cast */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_cast.js"), exports);
|
|
4935
4938
|
__exportStar(__webpack_require__(/*! ./sql_cds_parameters */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_cds_parameters.js"), exports);
|
|
4936
4939
|
__exportStar(__webpack_require__(/*! ./sql_client */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_client.js"), exports);
|
|
4937
4940
|
__exportStar(__webpack_require__(/*! ./sql_compare_operator */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_compare_operator.js"), exports);
|
|
@@ -5010,9 +5013,10 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
|
5010
5013
|
exports.InlineField = void 0;
|
|
5011
5014
|
const combi_1 = __webpack_require__(/*! ../combi */ "./node_modules/@abaplint/core/build/src/abap/2_statements/combi.js");
|
|
5012
5015
|
const _1 = __webpack_require__(/*! . */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js");
|
|
5016
|
+
const tokens_1 = __webpack_require__(/*! ../../1_lexer/tokens */ "./node_modules/@abaplint/core/build/src/abap/1_lexer/tokens/index.js");
|
|
5013
5017
|
class InlineField extends combi_1.Expression {
|
|
5014
5018
|
getRunnable() {
|
|
5015
|
-
return
|
|
5019
|
+
return (0, combi_1.seq)(_1.Field, (0, combi_1.starPrio)((0, combi_1.seq)((0, combi_1.tok)(tokens_1.Dash), _1.FieldAll)));
|
|
5016
5020
|
}
|
|
5017
5021
|
}
|
|
5018
5022
|
exports.InlineField = InlineField;
|
|
@@ -6585,7 +6589,7 @@ class SelectLoop extends combi_1.Expression {
|
|
|
6585
6589
|
const into = (0, combi_1.altPrio)(sql_into_structure_1.SQLIntoStructure, _1.SQLIntoList);
|
|
6586
6590
|
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));
|
|
6587
6591
|
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))));
|
|
6588
|
-
const aggr = (0, combi_1.seq)(_1.SQLAggregation, into, (0, combi_1.optPrio)(sql_up_to_1.SQLUpTo), _1.SQLFrom, where, _1.SQLGroupBy);
|
|
6592
|
+
const aggr = (0, combi_1.seq)((0, combi_1.plusPrio)(_1.SQLAggregation), into, (0, combi_1.optPrio)(sql_up_to_1.SQLUpTo), _1.SQLFrom, (0, combi_1.optPrio)(_1.SQLClient), (0, combi_1.optPrio)(where), _1.SQLGroupBy);
|
|
6589
6593
|
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));
|
|
6590
6594
|
return ret;
|
|
6591
6595
|
}
|
|
@@ -6913,7 +6917,7 @@ const _1 = __webpack_require__(/*! . */ "./node_modules/@abaplint/core/build/src
|
|
|
6913
6917
|
class SourceFieldSymbolChain extends combi_1.Expression {
|
|
6914
6918
|
getRunnable() {
|
|
6915
6919
|
const chain = (0, combi_1.seq)(new _1.ArrowOrDash(), _1.ComponentName);
|
|
6916
|
-
return (0, combi_1.seq)(_1.FieldSymbol, (0, combi_1.starPrio)(chain));
|
|
6920
|
+
return (0, combi_1.seq)(_1.FieldSymbol, (0, combi_1.starPrio)(chain), (0, combi_1.optPrio)(_1.TableBody));
|
|
6917
6921
|
}
|
|
6918
6922
|
}
|
|
6919
6923
|
exports.SourceFieldSymbolChain = SourceFieldSymbolChain;
|
|
@@ -7069,7 +7073,7 @@ class SQLCase extends combi_1.Expression {
|
|
|
7069
7073
|
const abap = (0, combi_1.seq)((0, combi_1.tok)(tokens_1.WAt), _1.SimpleFieldChain2);
|
|
7070
7074
|
const field = (0, combi_1.altPrio)(_1.SQLAggregation, SQLCase, _1.SQLFunction, _1.SQLPath, sql_field_name_1.SQLFieldName, constant_1.Constant);
|
|
7071
7075
|
const sub = (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)));
|
|
7072
|
-
const sourc = (0, combi_1.altPrio)(SQLCase, _1.SQLAggregation, _1.SQLFunction, sql_source_1.SQLSource, constant_1.Constant);
|
|
7076
|
+
const sourc = (0, combi_1.altPrio)(SQLCase, _1.SQLAggregation, _1.SQLFunction, sql_field_name_1.SQLFieldName, sql_source_1.SQLSource, constant_1.Constant);
|
|
7073
7077
|
const val = (0, combi_1.altPrio)(sql_cond_1.SQLCond, constant_1.Constant, abap);
|
|
7074
7078
|
const when = (0, combi_1.seq)("WHEN", val, "THEN", sourc, (0, combi_1.starPrio)(sub));
|
|
7075
7079
|
const els = (0, combi_1.seq)("ELSE", sourc);
|
|
@@ -7081,6 +7085,33 @@ exports.SQLCase = SQLCase;
|
|
|
7081
7085
|
|
|
7082
7086
|
/***/ }),
|
|
7083
7087
|
|
|
7088
|
+
/***/ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_cast.js":
|
|
7089
|
+
/*!*****************************************************************************************!*\
|
|
7090
|
+
!*** ./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_cast.js ***!
|
|
7091
|
+
\*****************************************************************************************/
|
|
7092
|
+
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
7093
|
+
|
|
7094
|
+
"use strict";
|
|
7095
|
+
|
|
7096
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
7097
|
+
exports.SQLCast = void 0;
|
|
7098
|
+
const _1 = __webpack_require__(/*! . */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js");
|
|
7099
|
+
const version_1 = __webpack_require__(/*! ../../../version */ "./node_modules/@abaplint/core/build/src/version.js");
|
|
7100
|
+
const tokens_1 = __webpack_require__(/*! ../../1_lexer/tokens */ "./node_modules/@abaplint/core/build/src/abap/1_lexer/tokens/index.js");
|
|
7101
|
+
const combi_1 = __webpack_require__(/*! ../combi */ "./node_modules/@abaplint/core/build/src/abap/2_statements/combi.js");
|
|
7102
|
+
const sql_field_name_1 = __webpack_require__(/*! ./sql_field_name */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_field_name.js");
|
|
7103
|
+
class SQLCast extends combi_1.Expression {
|
|
7104
|
+
getRunnable() {
|
|
7105
|
+
const abap = (0, combi_1.ver)(version_1.Version.v740sp05, (0, combi_1.seq)((0, combi_1.tok)(tokens_1.WAt), _1.SimpleFieldChain2), version_1.Version.OpenABAP);
|
|
7106
|
+
// todo: from version something
|
|
7107
|
+
return (0, combi_1.seq)("CAST", "(", (0, combi_1.opt)((0, combi_1.altPrio)(sql_field_name_1.SQLFieldName, abap)), "AS", sql_field_name_1.SQLFieldName, ")");
|
|
7108
|
+
}
|
|
7109
|
+
}
|
|
7110
|
+
exports.SQLCast = SQLCast;
|
|
7111
|
+
//# sourceMappingURL=sql_cast.js.map
|
|
7112
|
+
|
|
7113
|
+
/***/ }),
|
|
7114
|
+
|
|
7084
7115
|
/***/ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_cds_parameters.js":
|
|
7085
7116
|
/*!***************************************************************************************************!*\
|
|
7086
7117
|
!*** ./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_cds_parameters.js ***!
|
|
@@ -7235,7 +7266,8 @@ class SQLField extends combi_1.Expression {
|
|
|
7235
7266
|
getRunnable() {
|
|
7236
7267
|
const abap = (0, combi_1.ver)(version_1.Version.v740sp05, (0, combi_1.seq)((0, combi_1.tok)(tokens_1.WAt), _1.SimpleFieldChain2), version_1.Version.OpenABAP);
|
|
7237
7268
|
const as = (0, combi_1.seq)("AS", _1.SQLAsName);
|
|
7238
|
-
const
|
|
7269
|
+
const paren = (0, combi_1.seq)((0, combi_1.tok)(tokens_1.WParenLeftW), _1.SQLFieldName, (0, combi_1.altPrio)((0, combi_1.tok)(tokens_1.WParenRightW), (0, combi_1.tok)(tokens_1.WParenRight)));
|
|
7270
|
+
const field = (0, combi_1.altPrio)(_1.SQLAggregation, _1.SQLCase, _1.SQLCast, sql_function_1.SQLFunction, sql_path_1.SQLPath, _1.SQLFieldName, abap, _1.Constant, paren);
|
|
7239
7271
|
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))));
|
|
7240
7272
|
const arith = (0, combi_1.ver)(version_1.Version.v740sp05, sub);
|
|
7241
7273
|
return (0, combi_1.seq)(field, (0, combi_1.optPrio)(arith), (0, combi_1.optPrio)(as));
|
|
@@ -7286,13 +7318,11 @@ exports.SQLFieldList = void 0;
|
|
|
7286
7318
|
const combi_1 = __webpack_require__(/*! ../combi */ "./node_modules/@abaplint/core/build/src/abap/2_statements/combi.js");
|
|
7287
7319
|
const _1 = __webpack_require__(/*! . */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js");
|
|
7288
7320
|
const version_1 = __webpack_require__(/*! ../../../version */ "./node_modules/@abaplint/core/build/src/version.js");
|
|
7289
|
-
const tokens_1 = __webpack_require__(/*! ../../1_lexer/tokens */ "./node_modules/@abaplint/core/build/src/abap/1_lexer/tokens/index.js");
|
|
7290
7321
|
class SQLFieldList extends combi_1.Expression {
|
|
7291
7322
|
getRunnable() {
|
|
7292
|
-
const paren = (0, combi_1.seq)((0, combi_1.tok)(tokens_1.WParenLeftW), _1.SQLFieldName, (0, combi_1.tok)(tokens_1.WParenRightW));
|
|
7293
7323
|
const nev = (0, combi_1.ver)(version_1.Version.v740sp05, (0, combi_1.starPrio)((0, combi_1.seq)(",", _1.SQLField)), version_1.Version.OpenABAP);
|
|
7294
7324
|
const old = (0, combi_1.starPrio)(_1.SQLField);
|
|
7295
|
-
return (0, combi_1.altPrio)("*", _1.Dynamic, (0, combi_1.seq)(_1.SQLField, (0, combi_1.alt)(nev, old))
|
|
7325
|
+
return (0, combi_1.altPrio)("*", _1.Dynamic, (0, combi_1.seq)(_1.SQLField, (0, combi_1.alt)(nev, old)));
|
|
7296
7326
|
}
|
|
7297
7327
|
}
|
|
7298
7328
|
exports.SQLFieldList = SQLFieldList;
|
|
@@ -9620,7 +9650,7 @@ const expressions_1 = __webpack_require__(/*! ../expressions */ "./node_modules/
|
|
|
9620
9650
|
const version_1 = __webpack_require__(/*! ../../../version */ "./node_modules/@abaplint/core/build/src/version.js");
|
|
9621
9651
|
class CallBadi {
|
|
9622
9652
|
getMatcher() {
|
|
9623
|
-
const call = (0, combi_1.seq)("CALL
|
|
9653
|
+
const call = (0, combi_1.seq)("CALL BADI", expressions_1.MethodSource, expressions_1.MethodCallBody);
|
|
9624
9654
|
return (0, combi_1.verNot)(version_1.Version.Cloud, call);
|
|
9625
9655
|
}
|
|
9626
9656
|
}
|
|
@@ -12225,7 +12255,10 @@ class Field {
|
|
|
12225
12255
|
const module = (0, combi_1.seq)("MODULE", expressions_1.FormName, (0, combi_1.opt)((0, combi_1.alt)("ON INPUT", "ON REQUEST", "ON CHAIN-REQUEST")));
|
|
12226
12256
|
const values = (0, combi_1.seq)("VALUES", (0, combi_1.tok)(tokens_1.WParenLeft), "BETWEEN", expressions_1.Constant, "AND", expressions_1.Constant, (0, combi_1.tok)(tokens_1.ParenRightW));
|
|
12227
12257
|
const wit = (0, combi_1.seq)("WITH", expressions_1.FieldChain);
|
|
12228
|
-
const
|
|
12258
|
+
const cond = (0, combi_1.seq)(expressions_1.FieldChain, "=", expressions_1.FieldChain);
|
|
12259
|
+
const where = (0, combi_1.seq)(cond, (0, combi_1.starPrio)((0, combi_1.seq)("AND", cond)));
|
|
12260
|
+
const select = (0, combi_1.seq)("SELECT * FROM", expressions_1.FieldChain, "WHERE", where, "INTO RESULT WHENEVER NOT FOUND SEND ERRORMESSAGE");
|
|
12261
|
+
const ret = (0, combi_1.seq)("FIELD", expressions_1.FieldChain, (0, combi_1.opt)((0, combi_1.altPrio)(module, values, wit, select)));
|
|
12229
12262
|
return (0, combi_1.verNot)(version_1.Version.Cloud, ret);
|
|
12230
12263
|
}
|
|
12231
12264
|
}
|
|
@@ -13384,6 +13417,7 @@ __exportStar(__webpack_require__(/*! ./editor_call */ "./node_modules/@abaplint/
|
|
|
13384
13417
|
__exportStar(__webpack_require__(/*! ./break */ "./node_modules/@abaplint/core/build/src/abap/2_statements/statements/break.js"), exports);
|
|
13385
13418
|
__exportStar(__webpack_require__(/*! ./delete_textpool */ "./node_modules/@abaplint/core/build/src/abap/2_statements/statements/delete_textpool.js"), exports);
|
|
13386
13419
|
__exportStar(__webpack_require__(/*! ./get */ "./node_modules/@abaplint/core/build/src/abap/2_statements/statements/get.js"), exports);
|
|
13420
|
+
__exportStar(__webpack_require__(/*! ./loop_extract */ "./node_modules/@abaplint/core/build/src/abap/2_statements/statements/loop_extract.js"), exports);
|
|
13387
13421
|
__exportStar(__webpack_require__(/*! ./selectoption */ "./node_modules/@abaplint/core/build/src/abap/2_statements/statements/selectoption.js"), exports);
|
|
13388
13422
|
__exportStar(__webpack_require__(/*! ./convert */ "./node_modules/@abaplint/core/build/src/abap/2_statements/statements/convert.js"), exports);
|
|
13389
13423
|
__exportStar(__webpack_require__(/*! ./static */ "./node_modules/@abaplint/core/build/src/abap/2_statements/statements/static.js"), exports);
|
|
@@ -13921,14 +13955,14 @@ const loop_group_by_1 = __webpack_require__(/*! ../expressions/loop_group_by */
|
|
|
13921
13955
|
class Loop {
|
|
13922
13956
|
getMatcher() {
|
|
13923
13957
|
const where = (0, combi_1.seq)("WHERE", (0, combi_1.alt)(expressions_1.ComponentCond, expressions_1.Dynamic));
|
|
13924
|
-
const group = (0, combi_1.ver)(version_1.Version.v740sp08, (0, combi_1.seq)("GROUP BY", loop_group_by_1.LoopGroupBy));
|
|
13958
|
+
const group = (0, combi_1.ver)(version_1.Version.v740sp08, (0, combi_1.seq)("GROUP BY", loop_group_by_1.LoopGroupBy), version_1.Version.OpenABAP);
|
|
13925
13959
|
const step = (0, combi_1.ver)(version_1.Version.v757, (0, combi_1.seq)("STEP", expressions_1.Source));
|
|
13926
13960
|
const from = (0, combi_1.seq)("FROM", expressions_1.Source);
|
|
13927
13961
|
const to = (0, combi_1.seq)("TO", expressions_1.Source);
|
|
13928
13962
|
const usingKey = (0, combi_1.seq)("USING KEY", (0, combi_1.altPrio)(expressions_1.SimpleName, expressions_1.Dynamic));
|
|
13929
13963
|
const options = (0, combi_1.per)(expressions_1.LoopTarget, from, to, where, usingKey, group, step);
|
|
13930
|
-
const at = (0, combi_1.seq)(
|
|
13931
|
-
return (0, combi_1.seq)("LOOP",
|
|
13964
|
+
const at = (0, combi_1.seq)((0, combi_1.opt)((0, combi_1.seq)("SCREEN", (0, combi_1.failCombinator)())), (0, combi_1.opt)((0, combi_1.ver)(version_1.Version.v740sp08, "GROUP", version_1.Version.OpenABAP)), expressions_1.LoopSource, (0, combi_1.opt)(options));
|
|
13965
|
+
return (0, combi_1.seq)("LOOP AT", at);
|
|
13932
13966
|
}
|
|
13933
13967
|
}
|
|
13934
13968
|
exports.Loop = Loop;
|
|
@@ -13960,6 +13994,27 @@ exports.LoopAtScreen = LoopAtScreen;
|
|
|
13960
13994
|
|
|
13961
13995
|
/***/ }),
|
|
13962
13996
|
|
|
13997
|
+
/***/ "./node_modules/@abaplint/core/build/src/abap/2_statements/statements/loop_extract.js":
|
|
13998
|
+
/*!********************************************************************************************!*\
|
|
13999
|
+
!*** ./node_modules/@abaplint/core/build/src/abap/2_statements/statements/loop_extract.js ***!
|
|
14000
|
+
\********************************************************************************************/
|
|
14001
|
+
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
14002
|
+
|
|
14003
|
+
"use strict";
|
|
14004
|
+
|
|
14005
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
14006
|
+
exports.LoopExtract = void 0;
|
|
14007
|
+
const combi_1 = __webpack_require__(/*! ../combi */ "./node_modules/@abaplint/core/build/src/abap/2_statements/combi.js");
|
|
14008
|
+
class LoopExtract {
|
|
14009
|
+
getMatcher() {
|
|
14010
|
+
return (0, combi_1.str)("LOOP");
|
|
14011
|
+
}
|
|
14012
|
+
}
|
|
14013
|
+
exports.LoopExtract = LoopExtract;
|
|
14014
|
+
//# sourceMappingURL=loop_extract.js.map
|
|
14015
|
+
|
|
14016
|
+
/***/ }),
|
|
14017
|
+
|
|
13963
14018
|
/***/ "./node_modules/@abaplint/core/build/src/abap/2_statements/statements/message.js":
|
|
13964
14019
|
/*!***************************************************************************************!*\
|
|
13965
14020
|
!*** ./node_modules/@abaplint/core/build/src/abap/2_statements/statements/message.js ***!
|
|
@@ -15654,10 +15709,11 @@ const expressions_1 = __webpack_require__(/*! ../expressions */ "./node_modules/
|
|
|
15654
15709
|
const version_1 = __webpack_require__(/*! ../../../version */ "./node_modules/@abaplint/core/build/src/version.js");
|
|
15655
15710
|
class SelectionScreen {
|
|
15656
15711
|
getMatcher() {
|
|
15657
|
-
const
|
|
15712
|
+
const text = (0, combi_1.altPrio)(expressions_1.TextElement, expressions_1.InlineField);
|
|
15713
|
+
const beginBlock = (0, combi_1.seq)("BEGIN OF BLOCK", expressions_1.BlockName, (0, combi_1.optPrio)("WITH FRAME"), (0, combi_1.optPrio)((0, combi_1.seq)("TITLE", text)), (0, combi_1.optPrio)("NO INTERVALS"));
|
|
15658
15714
|
const endBlock = (0, combi_1.seq)("END OF BLOCK", expressions_1.BlockName);
|
|
15659
15715
|
const nesting = (0, combi_1.seq)("NESTING LEVEL", expressions_1.Source);
|
|
15660
|
-
const scrOptions = (0, combi_1.per)((0, combi_1.seq)("AS", (0, combi_1.alt)("WINDOW", "SUBSCREEN")), (0, combi_1.seq)("TITLE",
|
|
15716
|
+
const scrOptions = (0, combi_1.per)((0, combi_1.seq)("AS", (0, combi_1.alt)("WINDOW", "SUBSCREEN")), (0, combi_1.seq)("TITLE", text), "NO INTERVALS", nesting);
|
|
15661
15717
|
const beginScreen = (0, combi_1.seq)("BEGIN OF SCREEN", expressions_1.Integer, (0, combi_1.opt)(scrOptions));
|
|
15662
15718
|
const endScreen = (0, combi_1.seq)("END OF SCREEN", expressions_1.Integer);
|
|
15663
15719
|
const beginLine = (0, combi_1.str)("BEGIN OF LINE");
|
|
@@ -15668,12 +15724,12 @@ class SelectionScreen {
|
|
|
15668
15724
|
const ldb = (0, combi_1.seq)("FOR FIELD", expressions_1.FieldSub, (0, combi_1.optPrio)(ldbId));
|
|
15669
15725
|
const commentOpt = (0, combi_1.per)(ldb, modif, visible);
|
|
15670
15726
|
const position = (0, combi_1.seq)((0, combi_1.opt)((0, combi_1.regex)(/^\/?[\d\w]+$/)), (0, combi_1.altPrio)((0, combi_1.tok)(tokens_1.ParenLeft), (0, combi_1.tok)(tokens_1.WParenLeft)), expressions_1.Integer, (0, combi_1.altPrio)((0, combi_1.tok)(tokens_1.ParenRightW), (0, combi_1.tok)(tokens_1.ParenRight)));
|
|
15671
|
-
const comment = (0, combi_1.seq)("COMMENT", position, (0, combi_1.opt)(
|
|
15727
|
+
const comment = (0, combi_1.seq)("COMMENT", position, (0, combi_1.opt)(text), (0, combi_1.opt)(commentOpt));
|
|
15672
15728
|
const command = (0, combi_1.seq)("USER-COMMAND", (0, combi_1.alt)(expressions_1.Field, expressions_1.Constant));
|
|
15673
|
-
const push = (0, combi_1.seq)("PUSHBUTTON", position,
|
|
15729
|
+
const push = (0, combi_1.seq)("PUSHBUTTON", position, text, command, (0, combi_1.opt)(modif), (0, combi_1.opt)(visible));
|
|
15674
15730
|
const prog = (0, combi_1.seq)("PROGRAM", expressions_1.Field);
|
|
15675
15731
|
const def = (0, combi_1.seq)("DEFAULT", (0, combi_1.opt)(prog), "SCREEN", expressions_1.Integer);
|
|
15676
|
-
const tab = (0, combi_1.seq)("TAB", (0, combi_1.tok)(tokens_1.WParenLeft), expressions_1.Integer, (0, combi_1.tok)(tokens_1.ParenRightW),
|
|
15732
|
+
const tab = (0, combi_1.seq)("TAB", (0, combi_1.tok)(tokens_1.WParenLeft), expressions_1.Integer, (0, combi_1.tok)(tokens_1.ParenRightW), text, command, (0, combi_1.opt)(def), (0, combi_1.opt)(modif));
|
|
15677
15733
|
const func = (0, combi_1.seq)("FUNCTION KEY", expressions_1.Integer);
|
|
15678
15734
|
const skip = (0, combi_1.seq)("SKIP", (0, combi_1.opt)(expressions_1.Integer));
|
|
15679
15735
|
const posSymbols = (0, combi_1.altPrio)("POS_LOW", "POS_HIGH");
|
|
@@ -16291,8 +16347,7 @@ class Sort {
|
|
|
16291
16347
|
const fields = (0, combi_1.plus)((0, combi_1.seq)(sel, (0, combi_1.optPrio)(text), (0, combi_1.optPrio)(order), (0, combi_1.optPrio)(text)));
|
|
16292
16348
|
const by = (0, combi_1.seq)("BY", fields);
|
|
16293
16349
|
const normal = (0, combi_1.seq)(expressions_1.Target, (0, combi_1.opt)((0, combi_1.per)(order, by, "STABLE", text)));
|
|
16294
|
-
|
|
16295
|
-
return (0, combi_1.seq)("SORT", target);
|
|
16350
|
+
return (0, combi_1.seq)("SORT", normal);
|
|
16296
16351
|
}
|
|
16297
16352
|
}
|
|
16298
16353
|
exports.Sort = Sort;
|
|
@@ -16316,10 +16371,10 @@ const version_1 = __webpack_require__(/*! ../../../version */ "./node_modules/@a
|
|
|
16316
16371
|
class SortDataset {
|
|
16317
16372
|
getMatcher() {
|
|
16318
16373
|
const order = (0, combi_1.alt)("ASCENDING", "DESCENDING");
|
|
16319
|
-
const sel = (0, combi_1.alt)(expressions_1.
|
|
16374
|
+
const sel = (0, combi_1.alt)(expressions_1.ComponentChain, expressions_1.SourceFieldSymbol, expressions_1.Dynamic);
|
|
16320
16375
|
const fields = (0, combi_1.plus)((0, combi_1.seq)(sel, (0, combi_1.optPrio)(order)));
|
|
16321
16376
|
const by = (0, combi_1.seq)("BY", fields);
|
|
16322
|
-
const ret = (0, combi_1.seq)("SORT", (0, combi_1.opt)(by));
|
|
16377
|
+
const ret = (0, combi_1.seq)("SORT", (0, combi_1.opt)("AS TEXT"), (0, combi_1.opt)(by));
|
|
16323
16378
|
return (0, combi_1.verNot)(version_1.Version.Cloud, ret);
|
|
16324
16379
|
}
|
|
16325
16380
|
}
|
|
@@ -18717,6 +18772,7 @@ __exportStar(__webpack_require__(/*! ./dynpro_loop */ "./node_modules/@abaplint/
|
|
|
18717
18772
|
__exportStar(__webpack_require__(/*! ./statics */ "./node_modules/@abaplint/core/build/src/abap/3_structures/structures/statics.js"), exports);
|
|
18718
18773
|
__exportStar(__webpack_require__(/*! ./test_injection */ "./node_modules/@abaplint/core/build/src/abap/3_structures/structures/test_injection.js"), exports);
|
|
18719
18774
|
__exportStar(__webpack_require__(/*! ./test_seam */ "./node_modules/@abaplint/core/build/src/abap/3_structures/structures/test_seam.js"), exports);
|
|
18775
|
+
__exportStar(__webpack_require__(/*! ./loop_extract */ "./node_modules/@abaplint/core/build/src/abap/3_structures/structures/loop_extract.js"), exports);
|
|
18720
18776
|
__exportStar(__webpack_require__(/*! ./try */ "./node_modules/@abaplint/core/build/src/abap/3_structures/structures/try.js"), exports);
|
|
18721
18777
|
__exportStar(__webpack_require__(/*! ./type_enum */ "./node_modules/@abaplint/core/build/src/abap/3_structures/structures/type_enum.js"), exports);
|
|
18722
18778
|
__exportStar(__webpack_require__(/*! ./type_mesh */ "./node_modules/@abaplint/core/build/src/abap/3_structures/structures/type_mesh.js"), exports);
|
|
@@ -18822,6 +18878,29 @@ exports.LoopAtScreen = LoopAtScreen;
|
|
|
18822
18878
|
|
|
18823
18879
|
/***/ }),
|
|
18824
18880
|
|
|
18881
|
+
/***/ "./node_modules/@abaplint/core/build/src/abap/3_structures/structures/loop_extract.js":
|
|
18882
|
+
/*!********************************************************************************************!*\
|
|
18883
|
+
!*** ./node_modules/@abaplint/core/build/src/abap/3_structures/structures/loop_extract.js ***!
|
|
18884
|
+
\********************************************************************************************/
|
|
18885
|
+
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
18886
|
+
|
|
18887
|
+
"use strict";
|
|
18888
|
+
|
|
18889
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
18890
|
+
exports.LoopExtract = void 0;
|
|
18891
|
+
const Statements = __webpack_require__(/*! ../../2_statements/statements */ "./node_modules/@abaplint/core/build/src/abap/2_statements/statements/index.js");
|
|
18892
|
+
const _combi_1 = __webpack_require__(/*! ./_combi */ "./node_modules/@abaplint/core/build/src/abap/3_structures/structures/_combi.js");
|
|
18893
|
+
const _1 = __webpack_require__(/*! . */ "./node_modules/@abaplint/core/build/src/abap/3_structures/structures/index.js");
|
|
18894
|
+
class LoopExtract {
|
|
18895
|
+
getMatcher() {
|
|
18896
|
+
return (0, _combi_1.beginEnd)((0, _combi_1.sta)(Statements.LoopExtract), (0, _combi_1.star)((0, _combi_1.sub)(_1.Body)), (0, _combi_1.sta)(Statements.EndLoop));
|
|
18897
|
+
}
|
|
18898
|
+
}
|
|
18899
|
+
exports.LoopExtract = LoopExtract;
|
|
18900
|
+
//# sourceMappingURL=loop_extract.js.map
|
|
18901
|
+
|
|
18902
|
+
/***/ }),
|
|
18903
|
+
|
|
18825
18904
|
/***/ "./node_modules/@abaplint/core/build/src/abap/3_structures/structures/method.js":
|
|
18826
18905
|
/*!**************************************************************************************!*\
|
|
18827
18906
|
!*** ./node_modules/@abaplint/core/build/src/abap/3_structures/structures/method.js ***!
|
|
@@ -18886,7 +18965,7 @@ const _statement_1 = __webpack_require__(/*! ../../2_statements/statements/_stat
|
|
|
18886
18965
|
class Normal {
|
|
18887
18966
|
getMatcher() {
|
|
18888
18967
|
// note that the sequence of alternatives here influences performance
|
|
18889
|
-
return (0, _combi_1.alt)((0, _combi_1.sta)(Statements.Move), (0, _combi_1.sta)(Statements.Call), (0, _combi_1.sta)(Statements.Data), (0, _combi_1.sub)(Structures.If), (0, _combi_1.sta)(Statements.Clear), (0, _combi_1.sta)(Statements.FieldSymbol), (0, _combi_1.sta)(Statements.CreateObject), (0, _combi_1.sta)(Statements.CallFunction), (0, _combi_1.sta)(_statement_1.MacroCall), (0, _combi_1.sub)(Structures.LoopAtScreen), (0, _combi_1.sub)(Structures.Loop), (0, _combi_1.sta)(Statements.Append), (0, _combi_1.sub)(Structures.Try), (0, _combi_1.sub)(Structures.OnChange), (0, _combi_1.sta)(Statements.ReadTable), (0, _combi_1.sta)(Statements.Assert), (0, _combi_1.sta)(Statements.Return), (0, _combi_1.sta)(Statements.Select), (0, _combi_1.sta)(Statements.Assign), (0, _combi_1.sta)(Statements.InsertInternal), (0, _combi_1.sta)(Statements.DeleteInternal), (0, _combi_1.sta)(Statements.Concatenate), (0, _combi_1.sub)(Structures.Case), (0, _combi_1.sub)(Structures.CaseType), (0, _combi_1.sub)(Structures.Enhancement), (0, _combi_1.sub)(Structures.EnhancementSection), (0, _combi_1.sta)(Statements.AddCorresponding), (0, _combi_1.sta)(Statements.Add), (0, _combi_1.sta)(Statements.AssignLocalCopy), (0, _combi_1.sta)(Statements.AuthorityCheck), (0, _combi_1.sta)(Statements.Back), (0, _combi_1.sta)(Statements.Break), (0, _combi_1.sta)(Statements.BreakId), (0, _combi_1.sta)(Statements.CallDatabase), (0, _combi_1.sta)(Statements.CallDialog), (0, _combi_1.sta)(Statements.CallKernel), (0, _combi_1.sta)(Statements.CallOLE), (0, _combi_1.sta)(Statements.CallScreen), (0, _combi_1.sta)(Statements.ModifyScreen), (0, _combi_1.sta)(Statements.CallSelectionScreen), (0, _combi_1.sta)(Statements.CallTransaction), (0, _combi_1.sta)(Statements.CallTransformation), (0, _combi_1.sta)(Statements.Check), (0, _combi_1.sta)(Statements.ClassDefinitionLoad), (0, _combi_1.sta)(Statements.CloseCursor), (0, _combi_1.sta)(Statements.CloseDataset), (0, _combi_1.sta)(Statements.Collect), (0, _combi_1.sta)(Statements.Commit), (0, _combi_1.sta)(Statements.Communication), (0, _combi_1.sta)(Statements.Compute), (0, _combi_1.sta)(Statements.CallBadi), (0, _combi_1.sta)(Statements.Condense), (0, _combi_1.sta)(Statements.Constant), (0, _combi_1.sta)(Statements.Contexts), (0, _combi_1.sta)(Statements.Continue), (0, _combi_1.sta)(Statements.ConvertText), (0, _combi_1.sta)(Statements.Convert), (0, _combi_1.sta)(Statements.CreateData), (0, _combi_1.sta)(Statements.CreateOLE), (0, _combi_1.sta)(Statements.DeleteCluster), (0, _combi_1.sta)(Statements.DeleteDatabase), (0, _combi_1.sta)(Statements.DeleteDataset), (0, _combi_1.sta)(Statements.DeleteDynpro), (0, _combi_1.sta)(Statements.DeleteMemory), (0, _combi_1.sta)(Statements.DeleteReport), (0, _combi_1.sta)(Statements.DeleteTextpool), (0, _combi_1.sta)(Statements.Demand), (0, _combi_1.sta)(Statements.Describe), (0, _combi_1.sta)(Statements.Detail), (0, _combi_1.sta)(Statements.Divide), (0, _combi_1.sta)(Statements.EditorCall), (0, _combi_1.sta)(Statements.EnhancementPoint), (0, _combi_1.sta)(Statements.Exit), (0, _combi_1.sta)(Statements.ExportDynpro), (0, _combi_1.sta)(Statements.Export), (0, _combi_1.sta)(Statements.Extract), (0, _combi_1.sta)(Statements.FetchNextCursor), (0, _combi_1.sta)(Statements.FieldGroup), (0, _combi_1.sta)(Statements.Fields), (0, _combi_1.sta)(Statements.Find), (0, _combi_1.sta)(Statements.Format), (0, _combi_1.sta)(Statements.FreeMemory), (0, _combi_1.sta)(Statements.FreeObject), (0, _combi_1.sta)(Statements.Free), (0, _combi_1.sta)(Statements.GenerateDynpro), (0, _combi_1.sta)(Statements.GenerateReport), (0, _combi_1.sta)(Statements.GenerateSubroutine), (0, _combi_1.sta)(Statements.GetBadi), (0, _combi_1.sta)(Statements.GetBit), (0, _combi_1.sta)(Statements.GetCursor), (0, _combi_1.sta)(Statements.GetDataset), (0, _combi_1.sta)(Statements.GetLocale), (0, _combi_1.sta)(Statements.GetParameter), (0, _combi_1.sta)(Statements.GetPFStatus), (0, _combi_1.sta)(Statements.GetProperty), (0, _combi_1.sta)(Statements.GetReference), (0, _combi_1.sta)(Statements.GetRunTime), (0, _combi_1.sta)(Statements.GetTime), (0, _combi_1.sta)(Statements.Hide), (0, _combi_1.sta)(Statements.Nodes), (0, _combi_1.sta)(Statements.ImportDynpro), (0, _combi_1.sta)(Statements.ImportNametab), (0, _combi_1.sta)(Statements.MoveCorresponding), (0, _combi_1.sta)(Statements.Import), (0, _combi_1.sta)(Statements.Infotypes), (0, _combi_1.sta)(Statements.Include), // include does not have to be at top level
|
|
18968
|
+
return (0, _combi_1.alt)((0, _combi_1.sta)(Statements.Move), (0, _combi_1.sta)(Statements.Call), (0, _combi_1.sta)(Statements.Data), (0, _combi_1.sub)(Structures.If), (0, _combi_1.sta)(Statements.Clear), (0, _combi_1.sta)(Statements.FieldSymbol), (0, _combi_1.sta)(Statements.CreateObject), (0, _combi_1.sta)(Statements.CallFunction), (0, _combi_1.sta)(_statement_1.MacroCall), (0, _combi_1.sub)(Structures.LoopAtScreen), (0, _combi_1.sub)(Structures.Loop), (0, _combi_1.sub)(Structures.LoopExtract), (0, _combi_1.sta)(Statements.Append), (0, _combi_1.sub)(Structures.Try), (0, _combi_1.sub)(Structures.OnChange), (0, _combi_1.sta)(Statements.ReadTable), (0, _combi_1.sta)(Statements.Assert), (0, _combi_1.sta)(Statements.Return), (0, _combi_1.sta)(Statements.Select), (0, _combi_1.sta)(Statements.Assign), (0, _combi_1.sta)(Statements.InsertInternal), (0, _combi_1.sta)(Statements.DeleteInternal), (0, _combi_1.sta)(Statements.Concatenate), (0, _combi_1.sub)(Structures.Case), (0, _combi_1.sub)(Structures.CaseType), (0, _combi_1.sub)(Structures.Enhancement), (0, _combi_1.sub)(Structures.EnhancementSection), (0, _combi_1.sta)(Statements.AddCorresponding), (0, _combi_1.sta)(Statements.Add), (0, _combi_1.sta)(Statements.AssignLocalCopy), (0, _combi_1.sta)(Statements.AuthorityCheck), (0, _combi_1.sta)(Statements.Back), (0, _combi_1.sta)(Statements.Break), (0, _combi_1.sta)(Statements.BreakId), (0, _combi_1.sta)(Statements.CallDatabase), (0, _combi_1.sta)(Statements.CallDialog), (0, _combi_1.sta)(Statements.CallKernel), (0, _combi_1.sta)(Statements.CallOLE), (0, _combi_1.sta)(Statements.CallScreen), (0, _combi_1.sta)(Statements.ModifyScreen), (0, _combi_1.sta)(Statements.CallSelectionScreen), (0, _combi_1.sta)(Statements.CallTransaction), (0, _combi_1.sta)(Statements.CallTransformation), (0, _combi_1.sta)(Statements.Check), (0, _combi_1.sta)(Statements.ClassDefinitionLoad), (0, _combi_1.sta)(Statements.CloseCursor), (0, _combi_1.sta)(Statements.CloseDataset), (0, _combi_1.sta)(Statements.Collect), (0, _combi_1.sta)(Statements.Commit), (0, _combi_1.sta)(Statements.Communication), (0, _combi_1.sta)(Statements.Compute), (0, _combi_1.sta)(Statements.CallBadi), (0, _combi_1.sta)(Statements.Condense), (0, _combi_1.sta)(Statements.Constant), (0, _combi_1.sta)(Statements.Contexts), (0, _combi_1.sta)(Statements.Continue), (0, _combi_1.sta)(Statements.ConvertText), (0, _combi_1.sta)(Statements.Convert), (0, _combi_1.sta)(Statements.CreateData), (0, _combi_1.sta)(Statements.CreateOLE), (0, _combi_1.sta)(Statements.DeleteCluster), (0, _combi_1.sta)(Statements.DeleteDatabase), (0, _combi_1.sta)(Statements.DeleteDataset), (0, _combi_1.sta)(Statements.DeleteDynpro), (0, _combi_1.sta)(Statements.DeleteMemory), (0, _combi_1.sta)(Statements.DeleteReport), (0, _combi_1.sta)(Statements.DeleteTextpool), (0, _combi_1.sta)(Statements.Demand), (0, _combi_1.sta)(Statements.Describe), (0, _combi_1.sta)(Statements.Detail), (0, _combi_1.sta)(Statements.Divide), (0, _combi_1.sta)(Statements.EditorCall), (0, _combi_1.sta)(Statements.EnhancementPoint), (0, _combi_1.sta)(Statements.Exit), (0, _combi_1.sta)(Statements.ExportDynpro), (0, _combi_1.sta)(Statements.Export), (0, _combi_1.sta)(Statements.Extract), (0, _combi_1.sta)(Statements.FetchNextCursor), (0, _combi_1.sta)(Statements.FieldGroup), (0, _combi_1.sta)(Statements.Fields), (0, _combi_1.sta)(Statements.Find), (0, _combi_1.sta)(Statements.Format), (0, _combi_1.sta)(Statements.FreeMemory), (0, _combi_1.sta)(Statements.FreeObject), (0, _combi_1.sta)(Statements.Free), (0, _combi_1.sta)(Statements.GenerateDynpro), (0, _combi_1.sta)(Statements.GenerateReport), (0, _combi_1.sta)(Statements.GenerateSubroutine), (0, _combi_1.sta)(Statements.GetBadi), (0, _combi_1.sta)(Statements.GetBit), (0, _combi_1.sta)(Statements.GetCursor), (0, _combi_1.sta)(Statements.GetDataset), (0, _combi_1.sta)(Statements.GetLocale), (0, _combi_1.sta)(Statements.GetParameter), (0, _combi_1.sta)(Statements.GetPFStatus), (0, _combi_1.sta)(Statements.GetProperty), (0, _combi_1.sta)(Statements.GetReference), (0, _combi_1.sta)(Statements.GetRunTime), (0, _combi_1.sta)(Statements.GetTime), (0, _combi_1.sta)(Statements.Hide), (0, _combi_1.sta)(Statements.Nodes), (0, _combi_1.sta)(Statements.ImportDynpro), (0, _combi_1.sta)(Statements.ImportNametab), (0, _combi_1.sta)(Statements.MoveCorresponding), (0, _combi_1.sta)(Statements.Import), (0, _combi_1.sta)(Statements.Infotypes), (0, _combi_1.sta)(Statements.Include), // include does not have to be at top level
|
|
18890
18969
|
(0, _combi_1.sta)(Statements.InsertDatabase), (0, _combi_1.sta)(Statements.InsertReport), (0, _combi_1.sta)(Statements.InsertTextpool), (0, _combi_1.sta)(Statements.InsertFieldGroup), (0, _combi_1.sta)(Statements.InterfaceLoad), (0, _combi_1.sta)(Statements.Leave), (0, _combi_1.sta)(Statements.LoadReport), (0, _combi_1.sta)(Statements.Local), (0, _combi_1.sta)(Statements.With), (0, _combi_1.sta)(Statements.LogPoint), (0, _combi_1.sta)(Statements.Message), (0, _combi_1.sta)(Statements.ModifyLine), (0, _combi_1.sta)(Statements.ModifyDatabase), (0, _combi_1.sta)(Statements.ModifyInternal), (0, _combi_1.sta)(Statements.Multiply), (0, _combi_1.sta)(Statements.NewLine), (0, _combi_1.sta)(Statements.NewPage), (0, _combi_1.sta)(Statements.OpenCursor), (0, _combi_1.sta)(Statements.OpenDataset), (0, _combi_1.sta)(Statements.Overlay), (0, _combi_1.sta)(Statements.Pack), (0, _combi_1.sta)(Statements.Perform), (0, _combi_1.sta)(Statements.FormDefinition), (0, _combi_1.sta)(Statements.Position), (0, _combi_1.sta)(Statements.Put), (0, _combi_1.sta)(Statements.PrintControl), (0, _combi_1.sta)(Statements.RaiseEvent), (0, _combi_1.sta)(Statements.RaiseEntityEvent), (0, _combi_1.sta)(Statements.Raise), (0, _combi_1.sta)(Statements.Ranges), (0, _combi_1.sta)(Statements.ReadDataset), (0, _combi_1.sta)(Statements.ReadLine), (0, _combi_1.sta)(Statements.ReadReport), (0, _combi_1.sta)(Statements.ReadTextpool), (0, _combi_1.sta)(Statements.Receive), (0, _combi_1.sta)(Statements.RefreshControl), (0, _combi_1.sta)(Statements.Refresh), (0, _combi_1.sta)(Statements.Reject), (0, _combi_1.sta)(Statements.Replace), (0, _combi_1.sta)(Statements.Reserve), (0, _combi_1.sta)(Statements.Resume), (0, _combi_1.sta)(Statements.Retry), (0, _combi_1.sta)(Statements.Rollback), (0, _combi_1.sta)(Statements.Scan), (0, _combi_1.sta)(Statements.ScrollList), (0, _combi_1.sta)(Statements.Search), (0, _combi_1.sta)(Statements.SetBit), (0, _combi_1.sta)(Statements.SetBlank), (0, _combi_1.sta)(Statements.SetCountry), (0, _combi_1.sta)(Statements.SetCursor), (0, _combi_1.sta)(Statements.SetDataset), (0, _combi_1.sta)(Statements.SetExtendedCheck), (0, _combi_1.sta)(Statements.SetHandler), (0, _combi_1.sta)(Statements.SetLanguage), (0, _combi_1.sta)(Statements.SetLeft), (0, _combi_1.sta)(Statements.SetLocale), (0, _combi_1.sta)(Statements.SetMargin), (0, _combi_1.sta)(Statements.SetParameter), (0, _combi_1.sta)(Statements.SetPFStatus), (0, _combi_1.sta)(Statements.SetProperty), (0, _combi_1.sta)(Statements.SetRunTime), (0, _combi_1.sta)(Statements.SetScreen), (0, _combi_1.sta)(Statements.SetTitlebar), (0, _combi_1.sta)(Statements.SetUserCommand), (0, _combi_1.sta)(Statements.SetUpdateTask), (0, _combi_1.sta)(Statements.Shift), (0, _combi_1.sta)(Statements.Skip), (0, _combi_1.sta)(Statements.SortDataset), (0, _combi_1.sta)(Statements.Sort), (0, _combi_1.sta)(Statements.Static), (0, _combi_1.sta)(Statements.Split), (0, _combi_1.sta)(Statements.Stop), (0, _combi_1.sta)(Statements.Submit), (0, _combi_1.sta)(Statements.Summary), (0, _combi_1.sta)(Statements.SubtractCorresponding), (0, _combi_1.sta)(Statements.Subtract), (0, _combi_1.sta)(Statements.SuppressDialog), (0, _combi_1.sta)(Statements.Supply), (0, _combi_1.sta)(Statements.Sum), (0, _combi_1.sta)(Statements.SyntaxCheck), (0, _combi_1.sta)(Statements.SystemCall), (0, _combi_1.sta)(Statements.Tables), (0, _combi_1.sta)(Statements.Transfer), (0, _combi_1.sta)(Statements.Translate), (0, _combi_1.sta)(Statements.Type), (0, _combi_1.sta)(Statements.TypePools), (0, _combi_1.sta)(Statements.Uline), (0, _combi_1.sta)(Statements.Unassign), (0, _combi_1.sta)(Statements.Unpack), (0, _combi_1.sta)(Statements.UpdateDatabase), (0, _combi_1.sta)(Statements.Wait), (0, _combi_1.sta)(Statements.Window), (0, _combi_1.sta)(Statements.Write), (0, _combi_1.sta)(Statements.CommitEntities), (0, _combi_1.sta)(Statements.GetPermissions), (0, _combi_1.sta)(Statements.SetLocks), (0, _combi_1.sta)(Statements.ModifyEntities), (0, _combi_1.sta)(Statements.ReadEntities), (0, _combi_1.sta)(Statements.RollbackEntities), (0, _combi_1.sta)(Statements.Module), // todo, should be dynpro specific
|
|
18891
18970
|
(0, _combi_1.sta)(Statements.Field), // todo, should be dynpro specific
|
|
18892
18971
|
(0, _combi_1.sub)(Structures.Chain), // todo, should be dynpro specific
|
|
@@ -18911,9 +18990,10 @@ exports.OnChange = void 0;
|
|
|
18911
18990
|
const Statements = __webpack_require__(/*! ../../2_statements/statements */ "./node_modules/@abaplint/core/build/src/abap/2_statements/statements/index.js");
|
|
18912
18991
|
const _combi_1 = __webpack_require__(/*! ./_combi */ "./node_modules/@abaplint/core/build/src/abap/3_structures/structures/_combi.js");
|
|
18913
18992
|
const body_1 = __webpack_require__(/*! ./body */ "./node_modules/@abaplint/core/build/src/abap/3_structures/structures/body.js");
|
|
18993
|
+
const else_1 = __webpack_require__(/*! ./else */ "./node_modules/@abaplint/core/build/src/abap/3_structures/structures/else.js");
|
|
18914
18994
|
class OnChange {
|
|
18915
18995
|
getMatcher() {
|
|
18916
|
-
return (0, _combi_1.beginEnd)((0, _combi_1.sta)(Statements.OnChange), (0, _combi_1.opt)((0, _combi_1.sub)(body_1.Body)), (0, _combi_1.sta)(Statements.EndOn));
|
|
18996
|
+
return (0, _combi_1.beginEnd)((0, _combi_1.sta)(Statements.OnChange), (0, _combi_1.seq)((0, _combi_1.opt)((0, _combi_1.sub)(body_1.Body)), (0, _combi_1.opt)((0, _combi_1.sub)(else_1.Else))), (0, _combi_1.sta)(Statements.EndOn));
|
|
18917
18997
|
}
|
|
18918
18998
|
}
|
|
18919
18999
|
exports.OnChange = OnChange;
|
|
@@ -18959,9 +19039,10 @@ const _combi_1 = __webpack_require__(/*! ./_combi */ "./node_modules/@abaplint/c
|
|
|
18959
19039
|
const chain_1 = __webpack_require__(/*! ./chain */ "./node_modules/@abaplint/core/build/src/abap/3_structures/structures/chain.js");
|
|
18960
19040
|
const loop_1 = __webpack_require__(/*! ./loop */ "./node_modules/@abaplint/core/build/src/abap/3_structures/structures/loop.js");
|
|
18961
19041
|
const dynpro_loop_1 = __webpack_require__(/*! ./dynpro_loop */ "./node_modules/@abaplint/core/build/src/abap/3_structures/structures/dynpro_loop.js");
|
|
19042
|
+
const loop_extract_1 = __webpack_require__(/*! ./loop_extract */ "./node_modules/@abaplint/core/build/src/abap/3_structures/structures/loop_extract.js");
|
|
18962
19043
|
class ProcessAfterInput {
|
|
18963
19044
|
getMatcher() {
|
|
18964
|
-
const pai = (0, _combi_1.star)((0, _combi_1.alt)((0, _combi_1.sta)(Statements.Module), (0, _combi_1.sta)(Statements.Field), (0, _combi_1.sta)(Statements.CallSubscreen), (0, _combi_1.sub)(chain_1.Chain), (0, _combi_1.sub)(dynpro_loop_1.DynproLoop), (0, _combi_1.sub)(loop_1.Loop)));
|
|
19045
|
+
const pai = (0, _combi_1.star)((0, _combi_1.alt)((0, _combi_1.sta)(Statements.Module), (0, _combi_1.sta)(Statements.Field), (0, _combi_1.sta)(Statements.CallSubscreen), (0, _combi_1.sub)(chain_1.Chain), (0, _combi_1.sub)(dynpro_loop_1.DynproLoop), (0, _combi_1.sub)(loop_extract_1.LoopExtract), (0, _combi_1.sub)(loop_1.Loop)));
|
|
18965
19046
|
return (0, _combi_1.seq)((0, _combi_1.sta)(Statements.ProcessAfterInput), pai);
|
|
18966
19047
|
}
|
|
18967
19048
|
}
|
|
@@ -18983,9 +19064,10 @@ exports.ProcessBeforeOutput = void 0;
|
|
|
18983
19064
|
const Statements = __webpack_require__(/*! ../../2_statements/statements */ "./node_modules/@abaplint/core/build/src/abap/2_statements/statements/index.js");
|
|
18984
19065
|
const _combi_1 = __webpack_require__(/*! ./_combi */ "./node_modules/@abaplint/core/build/src/abap/3_structures/structures/_combi.js");
|
|
18985
19066
|
const dynpro_loop_1 = __webpack_require__(/*! ./dynpro_loop */ "./node_modules/@abaplint/core/build/src/abap/3_structures/structures/dynpro_loop.js");
|
|
19067
|
+
const loop_extract_1 = __webpack_require__(/*! ./loop_extract */ "./node_modules/@abaplint/core/build/src/abap/3_structures/structures/loop_extract.js");
|
|
18986
19068
|
class ProcessBeforeOutput {
|
|
18987
19069
|
getMatcher() {
|
|
18988
|
-
const pbo = (0, _combi_1.star)((0, _combi_1.alt)((0, _combi_1.sta)(Statements.Module), (0, _combi_1.sta)(Statements.Field), (0, _combi_1.sta)(Statements.CallSubscreen), (0, _combi_1.sub)(dynpro_loop_1.DynproLoop)));
|
|
19070
|
+
const pbo = (0, _combi_1.star)((0, _combi_1.alt)((0, _combi_1.sta)(Statements.Module), (0, _combi_1.sta)(Statements.Field), (0, _combi_1.sta)(Statements.CallSubscreen), (0, _combi_1.sub)(loop_extract_1.LoopExtract), (0, _combi_1.sub)(dynpro_loop_1.DynproLoop)));
|
|
18989
19071
|
return (0, _combi_1.seq)((0, _combi_1.sta)(Statements.ProcessBeforeOutput), pbo);
|
|
18990
19072
|
}
|
|
18991
19073
|
}
|
|
@@ -22988,6 +23070,9 @@ class BasicTypes {
|
|
|
22988
23070
|
if (chain === undefined) {
|
|
22989
23071
|
chain = node.findFirstExpression(Expressions.SimpleFieldChain);
|
|
22990
23072
|
}
|
|
23073
|
+
if (chain === undefined) {
|
|
23074
|
+
chain = node.findFirstExpression(Expressions.SimpleFieldChain2);
|
|
23075
|
+
}
|
|
22991
23076
|
if (chain === undefined) {
|
|
22992
23077
|
throw new Error("resolveLikeName, chain undefined");
|
|
22993
23078
|
}
|
|
@@ -23386,10 +23471,10 @@ class BasicTypes {
|
|
|
23386
23471
|
sub = node.findFirstExpression(Expressions.TypeParam);
|
|
23387
23472
|
}
|
|
23388
23473
|
if (sub === undefined) {
|
|
23389
|
-
sub = node.findFirstExpression(Expressions.
|
|
23474
|
+
sub = node.findFirstExpression(Expressions.TypeName);
|
|
23390
23475
|
}
|
|
23391
23476
|
if (sub === undefined) {
|
|
23392
|
-
sub = node.findFirstExpression(Expressions.
|
|
23477
|
+
sub = node.findFirstExpression(Expressions.FieldChain);
|
|
23393
23478
|
}
|
|
23394
23479
|
found = this.resolveLikeName(sub);
|
|
23395
23480
|
if (found && this.isOccurs(node)) {
|
|
@@ -23728,7 +23813,10 @@ class BasicTypes {
|
|
|
23728
23813
|
}
|
|
23729
23814
|
}
|
|
23730
23815
|
const found = this.resolveTypeName(chain);
|
|
23731
|
-
if (found &&
|
|
23816
|
+
if (found && found instanceof Types.VoidType) {
|
|
23817
|
+
return found;
|
|
23818
|
+
}
|
|
23819
|
+
else if (found && !(found instanceof Types.UnknownType)) {
|
|
23732
23820
|
return new Types.DataReference(found);
|
|
23733
23821
|
}
|
|
23734
23822
|
else if (chain.concatTokens().toUpperCase() === "DATA") {
|
|
@@ -24269,7 +24357,9 @@ class ComponentCompareSimple {
|
|
|
24269
24357
|
else if (c.get() instanceof Expressions.Dynamic) {
|
|
24270
24358
|
targetType = undefined;
|
|
24271
24359
|
}
|
|
24272
|
-
else if (c.get() instanceof Expressions.Source
|
|
24360
|
+
else if (c.get() instanceof Expressions.Source
|
|
24361
|
+
|| c.get() instanceof Expressions.SimpleSource4
|
|
24362
|
+
|| c.get() instanceof Expressions.SimpleSource2) {
|
|
24273
24363
|
const sourceType = source_1.Source.runSyntax(c, input, targetType);
|
|
24274
24364
|
if (targetType && new _type_utils_1.TypeUtils(input.scope).isAssignable(sourceType, targetType) === false) {
|
|
24275
24365
|
const message = "ComponentCompareSimple, incompatible types";
|
|
@@ -24839,7 +24929,7 @@ class FieldChain {
|
|
|
24839
24929
|
if (((_a = node.getFirstChild()) === null || _a === void 0 ? void 0 : _a.get()) instanceof Expressions.SourceField
|
|
24840
24930
|
&& node.findDirectExpression(Expressions.ComponentName)) {
|
|
24841
24931
|
// workaround for names with dashes, eg. "sy-repid"
|
|
24842
|
-
const concat = node.concatTokens();
|
|
24932
|
+
const concat = node.concatTokens().replace(/ /g, "");
|
|
24843
24933
|
const offset = ((_b = node.findDirectExpression(Expressions.FieldOffset)) === null || _b === void 0 ? void 0 : _b.concatTokens()) || "";
|
|
24844
24934
|
const length = ((_c = node.findDirectExpression(Expressions.FieldLength)) === null || _c === void 0 ? void 0 : _c.concatTokens()) || "";
|
|
24845
24935
|
const found = input.scope.findVariable(concat.replace(offset, "").replace(length, ""));
|
|
@@ -25201,16 +25291,24 @@ const basic_1 = __webpack_require__(/*! ../../types/basic */ "./node_modules/@ab
|
|
|
25201
25291
|
const expressions_1 = __webpack_require__(/*! ../../2_statements/expressions */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js");
|
|
25202
25292
|
const basic_types_1 = __webpack_require__(/*! ../basic_types */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/basic_types.js");
|
|
25203
25293
|
const assert_error_1 = __webpack_require__(/*! ../assert_error */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/assert_error.js");
|
|
25294
|
+
const tokens_1 = __webpack_require__(/*! ../../1_lexer/tokens */ "./node_modules/@abaplint/core/build/src/abap/1_lexer/tokens/index.js");
|
|
25204
25295
|
class FormParam {
|
|
25205
25296
|
static runSyntax(node, input) {
|
|
25206
|
-
var _a, _b
|
|
25207
|
-
const
|
|
25297
|
+
var _a, _b;
|
|
25298
|
+
const formParamName = node.findFirstExpression(expressions_1.FormParamName);
|
|
25299
|
+
if (formParamName === undefined) {
|
|
25300
|
+
throw new assert_error_1.AssertError("FormParam, could not find FormParamName");
|
|
25301
|
+
}
|
|
25302
|
+
let nameToken = formParamName.getFirstToken();
|
|
25303
|
+
if (formParamName.getChildren().length > 1) {
|
|
25304
|
+
nameToken = new tokens_1.Identifier(nameToken.getStart(), formParamName.concatTokens());
|
|
25305
|
+
}
|
|
25208
25306
|
if (node.findDirectTokenByText("STRUCTURE") && nameToken) {
|
|
25209
25307
|
// STRUCTURES typing
|
|
25210
|
-
const typeName = (
|
|
25308
|
+
const typeName = (_a = node.findDirectExpression(expressions_1.SimpleFieldChain)) === null || _a === void 0 ? void 0 : _a.getFirstToken().getStr();
|
|
25211
25309
|
let type = undefined;
|
|
25212
25310
|
if (typeName) {
|
|
25213
|
-
type = (
|
|
25311
|
+
type = (_b = input.scope.findType(typeName)) === null || _b === void 0 ? void 0 : _b.getType();
|
|
25214
25312
|
if (type === undefined) {
|
|
25215
25313
|
type = input.scope.getDDIC().lookupTableOrView(typeName).type;
|
|
25216
25314
|
}
|
|
@@ -28281,14 +28379,17 @@ class ValueBody {
|
|
|
28281
28379
|
const fields = new Set();
|
|
28282
28380
|
for (const s of node.findDirectExpressions(Expressions.FieldAssignment)) {
|
|
28283
28381
|
field_assignment_1.FieldAssignment.runSyntax(s, input, targetType);
|
|
28284
|
-
|
|
28285
|
-
|
|
28286
|
-
|
|
28287
|
-
|
|
28288
|
-
|
|
28289
|
-
|
|
28382
|
+
if (node.findDirectExpression(Expressions.ValueBodyLine) === undefined) {
|
|
28383
|
+
// todo: refine, still needs to be checked when there are table lines
|
|
28384
|
+
const fieldname = (_a = s.findDirectExpression(Expressions.FieldSub)) === null || _a === void 0 ? void 0 : _a.concatTokens().toUpperCase();
|
|
28385
|
+
if (fieldname) {
|
|
28386
|
+
if (fields.has(fieldname)) {
|
|
28387
|
+
const message = "Duplicate field assignment";
|
|
28388
|
+
input.issues.push((0, _syntax_input_1.syntaxIssue)(input, s.getFirstToken(), message));
|
|
28389
|
+
return basic_1.VoidType.get(_syntax_input_1.CheckSyntaxKey);
|
|
28390
|
+
}
|
|
28391
|
+
fields.add(fieldname);
|
|
28290
28392
|
}
|
|
28291
|
-
fields.add(fieldname);
|
|
28292
28393
|
}
|
|
28293
28394
|
}
|
|
28294
28395
|
let type = undefined; // todo, this is only correct if there is a single source in the body
|
|
@@ -29960,7 +30061,7 @@ class Controls {
|
|
|
29960
30061
|
}
|
|
29961
30062
|
if (node.findDirectTokenByText("TABLEVIEW") && token) {
|
|
29962
30063
|
const cols = new basic_1.StructureType([
|
|
29963
|
-
{ name: "SCREEN", type:
|
|
30064
|
+
{ name: "SCREEN", type: basic_1.VoidType.get("TABLEVIEW-SCREEN") }, // todo
|
|
29964
30065
|
{ name: "INDEX", type: basic_1.IntegerType.get() },
|
|
29965
30066
|
{ name: "SELECTED", type: new basic_1.CharacterType(1) },
|
|
29966
30067
|
{ name: "VISLENGTH", type: basic_1.IntegerType.get() },
|
|
@@ -30720,6 +30821,38 @@ exports.FetchNextCursor = FetchNextCursor;
|
|
|
30720
30821
|
|
|
30721
30822
|
/***/ }),
|
|
30722
30823
|
|
|
30824
|
+
/***/ "./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/field_group.js":
|
|
30825
|
+
/*!***************************************************************************************!*\
|
|
30826
|
+
!*** ./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/field_group.js ***!
|
|
30827
|
+
\***************************************************************************************/
|
|
30828
|
+
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
30829
|
+
|
|
30830
|
+
"use strict";
|
|
30831
|
+
|
|
30832
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
30833
|
+
exports.FieldGroup = void 0;
|
|
30834
|
+
const Expressions = __webpack_require__(/*! ../../2_statements/expressions */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js");
|
|
30835
|
+
const _typed_identifier_1 = __webpack_require__(/*! ../../types/_typed_identifier */ "./node_modules/@abaplint/core/build/src/abap/types/_typed_identifier.js");
|
|
30836
|
+
const basic_1 = __webpack_require__(/*! ../../types/basic */ "./node_modules/@abaplint/core/build/src/abap/types/basic/index.js");
|
|
30837
|
+
class FieldGroup {
|
|
30838
|
+
runSyntax(node, input) {
|
|
30839
|
+
const nameExpression = node.findFirstExpression(Expressions.Field);
|
|
30840
|
+
if (nameExpression === undefined) {
|
|
30841
|
+
return;
|
|
30842
|
+
}
|
|
30843
|
+
const name = nameExpression === null || nameExpression === void 0 ? void 0 : nameExpression.concatTokens();
|
|
30844
|
+
if (name === undefined) {
|
|
30845
|
+
return;
|
|
30846
|
+
}
|
|
30847
|
+
const id = new _typed_identifier_1.TypedIdentifier(nameExpression === null || nameExpression === void 0 ? void 0 : nameExpression.getFirstToken(), input.filename, basic_1.VoidType.get("FIELD-GROUP"));
|
|
30848
|
+
input.scope.addIdentifier(id);
|
|
30849
|
+
}
|
|
30850
|
+
}
|
|
30851
|
+
exports.FieldGroup = FieldGroup;
|
|
30852
|
+
//# sourceMappingURL=field_group.js.map
|
|
30853
|
+
|
|
30854
|
+
/***/ }),
|
|
30855
|
+
|
|
30723
30856
|
/***/ "./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/fieldsymbol.js":
|
|
30724
30857
|
/*!***************************************************************************************!*\
|
|
30725
30858
|
!*** ./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/fieldsymbol.js ***!
|
|
@@ -30903,6 +31036,30 @@ exports.Format = Format;
|
|
|
30903
31036
|
|
|
30904
31037
|
/***/ }),
|
|
30905
31038
|
|
|
31039
|
+
/***/ "./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/free.js":
|
|
31040
|
+
/*!********************************************************************************!*\
|
|
31041
|
+
!*** ./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/free.js ***!
|
|
31042
|
+
\********************************************************************************/
|
|
31043
|
+
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
31044
|
+
|
|
31045
|
+
"use strict";
|
|
31046
|
+
|
|
31047
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
31048
|
+
exports.Free = void 0;
|
|
31049
|
+
const Expressions = __webpack_require__(/*! ../../2_statements/expressions */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js");
|
|
31050
|
+
const target_1 = __webpack_require__(/*! ../expressions/target */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/target.js");
|
|
31051
|
+
class Free {
|
|
31052
|
+
runSyntax(node, input) {
|
|
31053
|
+
for (const t of node.findDirectExpressions(Expressions.Target)) {
|
|
31054
|
+
target_1.Target.runSyntax(t, input);
|
|
31055
|
+
}
|
|
31056
|
+
}
|
|
31057
|
+
}
|
|
31058
|
+
exports.Free = Free;
|
|
31059
|
+
//# sourceMappingURL=free.js.map
|
|
31060
|
+
|
|
31061
|
+
/***/ }),
|
|
31062
|
+
|
|
30906
31063
|
/***/ "./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/get_badi.js":
|
|
30907
31064
|
/*!************************************************************************************!*\
|
|
30908
31065
|
!*** ./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/get_badi.js ***!
|
|
@@ -31275,7 +31432,7 @@ const _syntax_input_1 = __webpack_require__(/*! ../_syntax_input */ "./node_modu
|
|
|
31275
31432
|
const assert_error_1 = __webpack_require__(/*! ../assert_error */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/assert_error.js");
|
|
31276
31433
|
class IncludeType {
|
|
31277
31434
|
runSyntax(node, input) {
|
|
31278
|
-
var _a, _b, _c;
|
|
31435
|
+
var _a, _b, _c, _d, _e;
|
|
31279
31436
|
const components = [];
|
|
31280
31437
|
const iname = node.findFirstExpression(Expressions.TypeName);
|
|
31281
31438
|
if (iname === undefined) {
|
|
@@ -31290,7 +31447,10 @@ class IncludeType {
|
|
|
31290
31447
|
ityp = found;
|
|
31291
31448
|
}
|
|
31292
31449
|
}
|
|
31293
|
-
|
|
31450
|
+
else if (ityp instanceof basic_1.UnknownType) {
|
|
31451
|
+
ityp = (_c = (_b = input.scope.findVariable(name)) === null || _b === void 0 ? void 0 : _b.getType()) !== null && _c !== void 0 ? _c : ityp;
|
|
31452
|
+
}
|
|
31453
|
+
const as = (_d = node.findExpressionAfterToken("AS")) === null || _d === void 0 ? void 0 : _d.concatTokens();
|
|
31294
31454
|
if (as && ityp instanceof basic_1.StructureType) {
|
|
31295
31455
|
ityp = new basic_1.StructureType(ityp.getComponents().concat([{
|
|
31296
31456
|
name: as,
|
|
@@ -31301,7 +31461,10 @@ class IncludeType {
|
|
|
31301
31461
|
else if (ityp instanceof basic_1.TableType && isStructure) {
|
|
31302
31462
|
ityp = ityp.getRowType();
|
|
31303
31463
|
}
|
|
31304
|
-
|
|
31464
|
+
if (ityp instanceof basic_1.VoidType) {
|
|
31465
|
+
return ityp;
|
|
31466
|
+
}
|
|
31467
|
+
else if (ityp instanceof basic_1.UnknownType) {
|
|
31305
31468
|
return ityp;
|
|
31306
31469
|
}
|
|
31307
31470
|
if (!(ityp instanceof basic_1.StructureType)) {
|
|
@@ -31309,7 +31472,7 @@ class IncludeType {
|
|
|
31309
31472
|
input.issues.push((0, _syntax_input_1.syntaxIssue)(input, iname.getFirstToken(), message));
|
|
31310
31473
|
return basic_1.VoidType.get(_syntax_input_1.CheckSyntaxKey);
|
|
31311
31474
|
}
|
|
31312
|
-
const suffix = (
|
|
31475
|
+
const suffix = (_e = node.findExpressionAfterToken("SUFFIX")) === null || _e === void 0 ? void 0 : _e.concatTokens();
|
|
31313
31476
|
if (suffix && ityp instanceof basic_1.StructureType) {
|
|
31314
31477
|
const components = [];
|
|
31315
31478
|
for (const c of ityp.getComponents()) {
|
|
@@ -32348,7 +32511,7 @@ class Parameter {
|
|
|
32348
32511
|
}
|
|
32349
32512
|
const magicName = "%_" + nameToken.getStr() + "_%_app_%";
|
|
32350
32513
|
const magicToken = new tokens_1.Identifier(nameToken.getStart(), magicName);
|
|
32351
|
-
input.scope.addIdentifier(new _typed_identifier_1.TypedIdentifier(magicToken, input.filename, basic_1.VoidType.get("PARAMETER
|
|
32514
|
+
input.scope.addIdentifier(new _typed_identifier_1.TypedIdentifier(magicToken, input.filename, basic_1.VoidType.get("PARAMETER-MAGIC")));
|
|
32352
32515
|
}
|
|
32353
32516
|
}
|
|
32354
32517
|
exports.Parameter = Parameter;
|
|
@@ -32587,7 +32750,7 @@ class Ranges {
|
|
|
32587
32750
|
if (typeExpression === undefined) {
|
|
32588
32751
|
throw new assert_error_1.AssertError("Ranges, unexpected node");
|
|
32589
32752
|
}
|
|
32590
|
-
const found = new basic_types_1.BasicTypes(input).
|
|
32753
|
+
const found = new basic_types_1.BasicTypes(input).resolveLikeName(typeExpression);
|
|
32591
32754
|
if (found && nameToken) {
|
|
32592
32755
|
const structure = new basic_1.StructureType([
|
|
32593
32756
|
{ name: "sign", type: new basic_1.CharacterType(1) },
|
|
@@ -32692,11 +32855,8 @@ const _syntax_input_1 = __webpack_require__(/*! ../_syntax_input */ "./node_modu
|
|
|
32692
32855
|
class ReadTable {
|
|
32693
32856
|
runSyntax(node, input) {
|
|
32694
32857
|
const concat = node.concatTokens().toUpperCase();
|
|
32695
|
-
const sources = node.
|
|
32696
|
-
|
|
32697
|
-
if (firstSource === undefined) {
|
|
32698
|
-
firstSource = sources[0];
|
|
32699
|
-
}
|
|
32858
|
+
const sources = node.findDirectExpressionsMulti([Expressions.Source, Expressions.SimpleSource2]);
|
|
32859
|
+
const firstSource = sources[0];
|
|
32700
32860
|
const sourceType = firstSource ? source_1.Source.runSyntax(firstSource, input) : undefined;
|
|
32701
32861
|
if (sourceType === undefined) {
|
|
32702
32862
|
const message = "No source type determined, read table";
|
|
@@ -32869,6 +33029,30 @@ exports.Receive = Receive;
|
|
|
32869
33029
|
|
|
32870
33030
|
/***/ }),
|
|
32871
33031
|
|
|
33032
|
+
/***/ "./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/refresh.js":
|
|
33033
|
+
/*!***********************************************************************************!*\
|
|
33034
|
+
!*** ./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/refresh.js ***!
|
|
33035
|
+
\***********************************************************************************/
|
|
33036
|
+
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
33037
|
+
|
|
33038
|
+
"use strict";
|
|
33039
|
+
|
|
33040
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
33041
|
+
exports.Refresh = void 0;
|
|
33042
|
+
const Expressions = __webpack_require__(/*! ../../2_statements/expressions */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js");
|
|
33043
|
+
const target_1 = __webpack_require__(/*! ../expressions/target */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/target.js");
|
|
33044
|
+
class Refresh {
|
|
33045
|
+
runSyntax(node, input) {
|
|
33046
|
+
for (const t of node.findDirectExpressions(Expressions.Target)) {
|
|
33047
|
+
target_1.Target.runSyntax(t, input);
|
|
33048
|
+
}
|
|
33049
|
+
}
|
|
33050
|
+
}
|
|
33051
|
+
exports.Refresh = Refresh;
|
|
33052
|
+
//# sourceMappingURL=refresh.js.map
|
|
33053
|
+
|
|
33054
|
+
/***/ }),
|
|
33055
|
+
|
|
32872
33056
|
/***/ "./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/replace.js":
|
|
32873
33057
|
/*!***********************************************************************************!*\
|
|
32874
33058
|
!*** ./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/replace.js ***!
|
|
@@ -33029,8 +33213,8 @@ class SelectionScreen {
|
|
|
33029
33213
|
return;
|
|
33030
33214
|
}
|
|
33031
33215
|
const field = node.findFirstExpression(Expressions.InlineField);
|
|
33032
|
-
if (field !== undefined && field.
|
|
33033
|
-
const message = "SELECTION-SCREEN name too long, " + field.
|
|
33216
|
+
if (field !== undefined && field.concatTokens().length > 8) {
|
|
33217
|
+
const message = "SELECTION-SCREEN name too long, " + field.concatTokens();
|
|
33034
33218
|
input.issues.push((0, _syntax_input_1.syntaxIssue)(input, field.getFirstToken(), message));
|
|
33035
33219
|
return;
|
|
33036
33220
|
}
|
|
@@ -33044,10 +33228,12 @@ class SelectionScreen {
|
|
|
33044
33228
|
input.scope.addIdentifier(new _typed_identifier_1.TypedIdentifier(blockToken, input.filename, type, ["selection_screen_tab" /* IdentifierMeta.SelectionScreenTab */]));
|
|
33045
33229
|
}
|
|
33046
33230
|
else if (concat.startsWith("SELECTION-SCREEN TAB") && fieldName) {
|
|
33047
|
-
|
|
33231
|
+
const id = new _typed_identifier_1.TypedIdentifier(fieldName, input.filename, new basic_1.CharacterType(83), ["selection_screen_tab" /* IdentifierMeta.SelectionScreenTab */]);
|
|
33232
|
+
input.scope.addNamedIdentifier(field.concatTokens(), id);
|
|
33048
33233
|
}
|
|
33049
33234
|
else if (fieldName) {
|
|
33050
|
-
|
|
33235
|
+
const id = new _typed_identifier_1.TypedIdentifier(fieldName, input.filename, new basic_1.CharacterType(83));
|
|
33236
|
+
input.scope.addNamedIdentifier(field.concatTokens(), id);
|
|
33051
33237
|
}
|
|
33052
33238
|
}
|
|
33053
33239
|
}
|
|
@@ -34308,11 +34494,13 @@ const Expressions = __webpack_require__(/*! ../../2_statements/expressions */ ".
|
|
|
34308
34494
|
const Statements = __webpack_require__(/*! ../../2_statements/statements */ "./node_modules/@abaplint/core/build/src/abap/2_statements/statements/index.js");
|
|
34309
34495
|
const Structures = __webpack_require__(/*! ../../3_structures/structures */ "./node_modules/@abaplint/core/build/src/abap/3_structures/structures/index.js");
|
|
34310
34496
|
const include_type_1 = __webpack_require__(/*! ../statements/include_type */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/include_type.js");
|
|
34497
|
+
const constant_1 = __webpack_require__(/*! ../statements/constant */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/constant.js");
|
|
34498
|
+
const constants_1 = __webpack_require__(/*! ./constants */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/structures/constants.js");
|
|
34311
34499
|
class Data {
|
|
34312
34500
|
static runSyntax(node, input) {
|
|
34313
34501
|
var _a;
|
|
34314
34502
|
const fouth = (_a = node.getFirstChild()) === null || _a === void 0 ? void 0 : _a.getChildren()[3];
|
|
34315
|
-
const isCommonPart = fouth instanceof nodes_1.TokenNode && fouth.concatTokens() === "COMMON";
|
|
34503
|
+
const isCommonPart = fouth instanceof nodes_1.TokenNode && fouth.concatTokens().toUpperCase() === "COMMON";
|
|
34316
34504
|
if (isCommonPart) {
|
|
34317
34505
|
this.runCommonPartSyntax(node, input);
|
|
34318
34506
|
return undefined;
|
|
@@ -34345,46 +34533,6 @@ class Data {
|
|
|
34345
34533
|
}
|
|
34346
34534
|
else if (c instanceof nodes_1.StatementNode && ctyp instanceof Statements.IncludeType) {
|
|
34347
34535
|
// INCLUDES
|
|
34348
|
-
/*
|
|
34349
|
-
const typeToken = c.findFirstExpression(Expressions.TypeName)?.getFirstToken();
|
|
34350
|
-
const typeName = typeToken?.getStr();
|
|
34351
|
-
|
|
34352
|
-
let foundId = input.scope.findType(typeName);
|
|
34353
|
-
if (foundId === undefined) {
|
|
34354
|
-
foundId = input.scope.findVariable(typeName);
|
|
34355
|
-
}
|
|
34356
|
-
|
|
34357
|
-
let found = foundId?.getType();
|
|
34358
|
-
if (found === undefined) {
|
|
34359
|
-
const f = input.scope.getDDIC().lookupTableOrView(typeName).type;
|
|
34360
|
-
if (f instanceof TypedIdentifier) {
|
|
34361
|
-
found = f.getType();
|
|
34362
|
-
} else {
|
|
34363
|
-
found = f;
|
|
34364
|
-
}
|
|
34365
|
-
} else {
|
|
34366
|
-
input.scope.addReference(typeToken, foundId, ReferenceType.TypeReference, input.filename);
|
|
34367
|
-
}
|
|
34368
|
-
if (found instanceof Basic.VoidType) {
|
|
34369
|
-
if (table === true) {
|
|
34370
|
-
const ttyp = new Basic.TableType(found, {withHeader: true, keyType: Basic.TableKeyType.default});
|
|
34371
|
-
return new TypedIdentifier(name, input.filename, ttyp);
|
|
34372
|
-
} else {
|
|
34373
|
-
return new TypedIdentifier(name, input.filename, found);
|
|
34374
|
-
}
|
|
34375
|
-
}
|
|
34376
|
-
if (found instanceof Basic.UnknownType) {
|
|
34377
|
-
return new TypedIdentifier(name, input.filename, new Basic.UnknownType("unknown type, " + typeName));
|
|
34378
|
-
}
|
|
34379
|
-
if (found instanceof Basic.TableType && found.isWithHeader()) {
|
|
34380
|
-
found = found.getRowType();
|
|
34381
|
-
}
|
|
34382
|
-
if (!(found instanceof Basic.StructureType)) {
|
|
34383
|
-
const message = "not structured, " + typeName;
|
|
34384
|
-
input.issues.push(syntaxIssue(input, typeToken!, message));
|
|
34385
|
-
return new TypedIdentifier(name, input.filename, Basic.VoidType.get(CheckSyntaxKey));
|
|
34386
|
-
}
|
|
34387
|
-
*/
|
|
34388
34536
|
const found = new include_type_1.IncludeType().runSyntax(c, input);
|
|
34389
34537
|
if (found instanceof Basic.VoidType) {
|
|
34390
34538
|
if (table === true) {
|
|
@@ -34395,6 +34543,9 @@ class Data {
|
|
|
34395
34543
|
return new _typed_identifier_1.TypedIdentifier(name, input.filename, found);
|
|
34396
34544
|
}
|
|
34397
34545
|
}
|
|
34546
|
+
else if (found instanceof Basic.UnknownType) {
|
|
34547
|
+
return new _typed_identifier_1.TypedIdentifier(name, input.filename, found);
|
|
34548
|
+
}
|
|
34398
34549
|
for (const c of found) {
|
|
34399
34550
|
components.push(c);
|
|
34400
34551
|
}
|
|
@@ -34435,6 +34586,18 @@ class Data {
|
|
|
34435
34586
|
input.scope.addType(found);
|
|
34436
34587
|
}
|
|
34437
34588
|
}
|
|
34589
|
+
else if (c instanceof nodes_1.StatementNode && ctyp instanceof Statements.Constant) {
|
|
34590
|
+
const found = new constant_1.Constant().runSyntax(c, input);
|
|
34591
|
+
if (found) {
|
|
34592
|
+
input.scope.addIdentifier(found);
|
|
34593
|
+
}
|
|
34594
|
+
}
|
|
34595
|
+
else if (c instanceof nodes_1.StructureNode && ctyp instanceof Structures.Constants) {
|
|
34596
|
+
const { type: found, values: _ } = new constants_1.Constants().runSyntax(c, input);
|
|
34597
|
+
if (found) {
|
|
34598
|
+
input.scope.addIdentifier(found);
|
|
34599
|
+
}
|
|
34600
|
+
}
|
|
34438
34601
|
}
|
|
34439
34602
|
}
|
|
34440
34603
|
}
|
|
@@ -34665,7 +34828,7 @@ class Types {
|
|
|
34665
34828
|
}
|
|
34666
34829
|
else if (ctyp instanceof Statements.IncludeType) {
|
|
34667
34830
|
const found = new include_type_1.IncludeType().runSyntax(c, input);
|
|
34668
|
-
if (found instanceof basic_1.VoidType) {
|
|
34831
|
+
if (found instanceof basic_1.VoidType || found instanceof Basic.UnknownType) {
|
|
34669
34832
|
voidd = found;
|
|
34670
34833
|
}
|
|
34671
34834
|
else {
|
|
@@ -34774,6 +34937,8 @@ const do_1 = __webpack_require__(/*! ./statements/do */ "./node_modules/@abaplin
|
|
|
34774
34937
|
const concatenate_1 = __webpack_require__(/*! ./statements/concatenate */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/concatenate.js");
|
|
34775
34938
|
const call_function_1 = __webpack_require__(/*! ./statements/call_function */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/call_function.js");
|
|
34776
34939
|
const clear_1 = __webpack_require__(/*! ./statements/clear */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/clear.js");
|
|
34940
|
+
const refresh_1 = __webpack_require__(/*! ./statements/refresh */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/refresh.js");
|
|
34941
|
+
const free_1 = __webpack_require__(/*! ./statements/free */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/free.js");
|
|
34777
34942
|
const replace_1 = __webpack_require__(/*! ./statements/replace */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/replace.js");
|
|
34778
34943
|
const get_bit_1 = __webpack_require__(/*! ./statements/get_bit */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/get_bit.js");
|
|
34779
34944
|
const raise_1 = __webpack_require__(/*! ./statements/raise */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/raise.js");
|
|
@@ -34856,6 +35021,7 @@ const modify_entities_1 = __webpack_require__(/*! ./statements/modify_entities *
|
|
|
34856
35021
|
const commit_entities_1 = __webpack_require__(/*! ./statements/commit_entities */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/commit_entities.js");
|
|
34857
35022
|
const _syntax_input_1 = __webpack_require__(/*! ./_syntax_input */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/_syntax_input.js");
|
|
34858
35023
|
const assert_error_1 = __webpack_require__(/*! ./assert_error */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/assert_error.js");
|
|
35024
|
+
const field_group_1 = __webpack_require__(/*! ./statements/field_group */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/field_group.js");
|
|
34859
35025
|
// -----------------------------------
|
|
34860
35026
|
const map = {};
|
|
34861
35027
|
function addToMap(handler) {
|
|
@@ -34899,6 +35065,8 @@ if (Object.keys(map).length === 0) {
|
|
|
34899
35065
|
addToMap(new delete_internal_1.DeleteInternal());
|
|
34900
35066
|
addToMap(new delete_cluster_1.DeleteCluster());
|
|
34901
35067
|
addToMap(new clear_1.Clear());
|
|
35068
|
+
addToMap(new free_1.Free());
|
|
35069
|
+
addToMap(new refresh_1.Refresh());
|
|
34902
35070
|
addToMap(new receive_1.Receive());
|
|
34903
35071
|
addToMap(new get_bit_1.GetBit());
|
|
34904
35072
|
addToMap(new class_local_friends_1.ClassLocalFriends());
|
|
@@ -34986,6 +35154,7 @@ if (Object.keys(map).length === 0) {
|
|
|
34986
35154
|
addToMap(new translate_1.Translate());
|
|
34987
35155
|
addToMap(new modify_internal_1.ModifyInternal());
|
|
34988
35156
|
addToMap(new read_textpool_1.ReadTextpool());
|
|
35157
|
+
addToMap(new field_group_1.FieldGroup());
|
|
34989
35158
|
addToMap(new editor_call_1.EditorCall());
|
|
34990
35159
|
addToMap(new delete_memory_1.DeleteMemory());
|
|
34991
35160
|
}
|
|
@@ -35929,6 +36098,15 @@ class StatementNode extends _abstract_node_1.AbstractNode {
|
|
|
35929
36098
|
}
|
|
35930
36099
|
return ret;
|
|
35931
36100
|
}
|
|
36101
|
+
findDirectExpressionsMulti(type) {
|
|
36102
|
+
const ret = [];
|
|
36103
|
+
for (const child of this.getChildren()) {
|
|
36104
|
+
if (child instanceof expression_node_1.ExpressionNode && type.some(t => child.get() instanceof t)) {
|
|
36105
|
+
ret.push(child);
|
|
36106
|
+
}
|
|
36107
|
+
}
|
|
36108
|
+
return ret;
|
|
36109
|
+
}
|
|
35932
36110
|
findDirectTokenByText(text) {
|
|
35933
36111
|
const upper = text.toUpperCase();
|
|
35934
36112
|
for (const child of this.getChildren()) {
|
|
@@ -39716,7 +39894,8 @@ class Result {
|
|
|
39716
39894
|
}
|
|
39717
39895
|
add(text, row, col, mode) {
|
|
39718
39896
|
if (text.length > 0) {
|
|
39719
|
-
if (mode === Mode.SingleLineComment
|
|
39897
|
+
if (mode === Mode.SingleLineComment
|
|
39898
|
+
&& (text.startsWith("--") || text.startsWith("//"))) {
|
|
39720
39899
|
this.result.push(new tokens_1.Comment(new position_1.Position(row, col - text.length), text));
|
|
39721
39900
|
}
|
|
39722
39901
|
else {
|
|
@@ -39861,7 +40040,6 @@ class CDSParser {
|
|
|
39861
40040
|
}
|
|
39862
40041
|
let tokens = cds_lexer_1.CDSLexer.run(file);
|
|
39863
40042
|
tokens = tokens.filter(t => !(t instanceof tokens_1.Comment));
|
|
39864
|
-
// console.dir(tokens);
|
|
39865
40043
|
let res = combi_1.Combi.run(new Expressions.CDSDefineView(), tokens, version_1.defaultVersion);
|
|
39866
40044
|
if (res === undefined || !(res[0] instanceof nodes_1.ExpressionNode)) {
|
|
39867
40045
|
res = combi_1.Combi.run(new Expressions.CDSDefineAbstract(), tokens, version_1.defaultVersion);
|
|
@@ -40494,7 +40672,7 @@ const combi_1 = __webpack_require__(/*! ../../abap/2_statements/combi */ "./node
|
|
|
40494
40672
|
class CDSFunctionInput extends combi_1.Expression {
|
|
40495
40673
|
getRunnable() {
|
|
40496
40674
|
const qualified = (0, combi_1.seq)(_1.CDSName, (0, combi_1.opt)(_1.CDSParameters), (0, combi_1.starPrio)((0, combi_1.seq)(".", _1.CDSName, (0, combi_1.opt)(_1.CDSParameters))));
|
|
40497
|
-
const input = (0, combi_1.altPrio)(_1.CDSArithmetics, _1.CDSCast, _1.CDSFunction, _1.CDSCase, _1.CDSString, qualified, _1.CDSInteger);
|
|
40675
|
+
const input = (0, combi_1.altPrio)(_1.CDSArithmetics, _1.CDSAggregate, _1.CDSCast, _1.CDSFunction, _1.CDSCase, _1.CDSString, qualified, _1.CDSInteger);
|
|
40498
40676
|
return input;
|
|
40499
40677
|
}
|
|
40500
40678
|
}
|
|
@@ -40586,7 +40764,7 @@ class CDSJoin extends combi_1.Expression {
|
|
|
40586
40764
|
getRunnable() {
|
|
40587
40765
|
const cond = (0, combi_1.seq)(_1.CDSSource, "ON", cds_condition_1.CDSCondition);
|
|
40588
40766
|
const foo = (0, combi_1.altPrio)((0, combi_1.seq)("(", cond, ")"), cond);
|
|
40589
|
-
return (0, combi_1.seq)((0, combi_1.optPrio)((0, combi_1.altPrio)("LEFT OUTER TO ONE", "LEFT OUTER", "INNER", "CROSS", "RIGHT OUTER")), "JOIN", foo);
|
|
40767
|
+
return (0, combi_1.seq)((0, combi_1.optPrio)((0, combi_1.altPrio)("LEFT OUTER TO ONE", "LEFT OUTER", "INNER", "CROSS", "RIGHT OUTER")), "JOIN", (0, combi_1.altPrio)(foo, _1.CDSSource));
|
|
40590
40768
|
}
|
|
40591
40769
|
}
|
|
40592
40770
|
exports.CDSJoin = CDSJoin;
|
|
@@ -40775,7 +40953,7 @@ const _1 = __webpack_require__(/*! . */ "./node_modules/@abaplint/core/build/src
|
|
|
40775
40953
|
const combi_1 = __webpack_require__(/*! ../../abap/2_statements/combi */ "./node_modules/@abaplint/core/build/src/abap/2_statements/combi.js");
|
|
40776
40954
|
class CDSSource extends combi_1.Expression {
|
|
40777
40955
|
getRunnable() {
|
|
40778
|
-
return (0, combi_1.seq)(_1.CDSName, (0, combi_1.optPrio)(_1.CDSParametersSelect), (0, combi_1.
|
|
40956
|
+
return (0, combi_1.seq)(_1.CDSName, (0, combi_1.optPrio)(_1.CDSParametersSelect), (0, combi_1.opt)((0, combi_1.altPrio)(_1.CDSAs, _1.CDSName)));
|
|
40779
40957
|
}
|
|
40780
40958
|
}
|
|
40781
40959
|
exports.CDSSource = CDSSource;
|
|
@@ -40796,8 +40974,10 @@ exports.CDSString = void 0;
|
|
|
40796
40974
|
const combi_1 = __webpack_require__(/*! ../../abap/2_statements/combi */ "./node_modules/@abaplint/core/build/src/abap/2_statements/combi.js");
|
|
40797
40975
|
class CDSString extends combi_1.Expression {
|
|
40798
40976
|
getRunnable() {
|
|
40977
|
+
const abap = (0, combi_1.seq)("abap", ".", (0, combi_1.regex)(/^char'\w'$/));
|
|
40799
40978
|
// https://stackoverflow.com/a/57754227
|
|
40800
|
-
|
|
40979
|
+
const reg = (0, combi_1.regex)(/^'[A-Za-zÀ-ž\u0370-\u03FF\u0400-\u04FF:\| -_]*'$/);
|
|
40980
|
+
return (0, combi_1.altPrio)(reg, abap);
|
|
40801
40981
|
}
|
|
40802
40982
|
}
|
|
40803
40983
|
exports.CDSString = CDSString;
|
|
@@ -43552,7 +43732,7 @@ class Help {
|
|
|
43552
43732
|
const tokens = cds_lexer_1.CDSLexer.run(file);
|
|
43553
43733
|
content += `<h3>Tokens</h3>\n<pre>\n`;
|
|
43554
43734
|
for (const t of tokens) {
|
|
43555
|
-
content += JSON.stringify(t) + "\n";
|
|
43735
|
+
content += JSON.stringify(t) + " " + t.constructor.name + "\n";
|
|
43556
43736
|
}
|
|
43557
43737
|
content += `</pre>\n`;
|
|
43558
43738
|
}
|
|
@@ -53457,7 +53637,7 @@ class Registry {
|
|
|
53457
53637
|
}
|
|
53458
53638
|
static abaplintVersion() {
|
|
53459
53639
|
// magic, see build script "version.sh"
|
|
53460
|
-
return "2.113.
|
|
53640
|
+
return "2.113.232";
|
|
53461
53641
|
}
|
|
53462
53642
|
getDDICReferences() {
|
|
53463
53643
|
return this.ddicReferences;
|
|
@@ -55436,6 +55616,10 @@ DATA END OF foo.`,
|
|
|
55436
55616
|
if (t.getChildren().length !== 3) {
|
|
55437
55617
|
continue;
|
|
55438
55618
|
}
|
|
55619
|
+
const data = t.findFirstStatement(Statements.DataBegin);
|
|
55620
|
+
if (data === null || data === void 0 ? void 0 : data.findDirectTokenByText("OCCURS")) {
|
|
55621
|
+
continue;
|
|
55622
|
+
}
|
|
55439
55623
|
if (t.findFirstStatement(Statements.IncludeType)) {
|
|
55440
55624
|
const token = t.getFirstToken();
|
|
55441
55625
|
const message = "DATA BEGIN with single INCLUDE";
|
|
@@ -56360,6 +56544,7 @@ const _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ "./
|
|
|
56360
56544
|
const _abap_object_1 = __webpack_require__(/*! ../objects/_abap_object */ "./node_modules/@abaplint/core/build/src/objects/_abap_object.js");
|
|
56361
56545
|
const include_graph_1 = __webpack_require__(/*! ../utils/include_graph */ "./node_modules/@abaplint/core/build/src/utils/include_graph.js");
|
|
56362
56546
|
const _irule_1 = __webpack_require__(/*! ./_irule */ "./node_modules/@abaplint/core/build/src/rules/_irule.js");
|
|
56547
|
+
const objects_1 = __webpack_require__(/*! ../objects */ "./node_modules/@abaplint/core/build/src/objects/index.js");
|
|
56363
56548
|
class CheckIncludeConf extends _basic_rule_config_1.BasicRuleConfig {
|
|
56364
56549
|
}
|
|
56365
56550
|
exports.CheckIncludeConf = CheckIncludeConf;
|
|
@@ -56375,7 +56560,8 @@ class CheckInclude {
|
|
|
56375
56560
|
extendedInformation: `
|
|
56376
56561
|
* Reports unused includes
|
|
56377
56562
|
* Errors if the includes are not found
|
|
56378
|
-
* Error if including a main program
|
|
56563
|
+
* Error if including a main program
|
|
56564
|
+
* Skips ZX* includes`,
|
|
56379
56565
|
tags: [_irule_1.RuleTag.Syntax],
|
|
56380
56566
|
};
|
|
56381
56567
|
}
|
|
@@ -56394,6 +56580,9 @@ class CheckInclude {
|
|
|
56394
56580
|
if (!(obj instanceof _abap_object_1.ABAPObject)) {
|
|
56395
56581
|
return [];
|
|
56396
56582
|
}
|
|
56583
|
+
if (obj instanceof objects_1.Program && obj.isInclude() === true && obj.getName().startsWith("ZX")) {
|
|
56584
|
+
return [];
|
|
56585
|
+
}
|
|
56397
56586
|
let ret = [];
|
|
56398
56587
|
for (const file of obj.getABAPFiles()) {
|
|
56399
56588
|
ret = ret.concat(this.graph.getIssuesFile(file));
|
|
@@ -68962,6 +69151,12 @@ class ObsoleteStatementConf extends _basic_rule_config_1.BasicRuleConfig {
|
|
|
68962
69151
|
this.formDefinition = true;
|
|
68963
69152
|
/** Check for FORM IMPLEMENTATION */
|
|
68964
69153
|
this.formImplementation = true;
|
|
69154
|
+
/** Check for COMMON PART */
|
|
69155
|
+
this.commonPart = true;
|
|
69156
|
+
/** Check for FIELD-GROUPS */
|
|
69157
|
+
this.fieldGroups = true;
|
|
69158
|
+
/** Check for REPLACE INTO */
|
|
69159
|
+
this.replaceInto = true;
|
|
68965
69160
|
}
|
|
68966
69161
|
}
|
|
68967
69162
|
exports.ObsoleteStatementConf = ObsoleteStatementConf;
|
|
@@ -69073,10 +69268,22 @@ ENDIF.`,
|
|
|
69073
69268
|
const issue = issue_1.Issue.atStatement(file, staNode, "COMMUNICATION is obsolete", this.getMetadata().key, this.conf.severity);
|
|
69074
69269
|
issues.push(issue);
|
|
69075
69270
|
}
|
|
69271
|
+
if (this.conf.commonPart && sta instanceof Statements.DataBegin && staNode.findDirectTokenByText("COMMON")) {
|
|
69272
|
+
const issue = issue_1.Issue.atStatement(file, staNode, "COMMON PART is obsolete", this.getMetadata().key, this.conf.severity);
|
|
69273
|
+
issues.push(issue);
|
|
69274
|
+
}
|
|
69275
|
+
if (this.conf.replaceInto && sta instanceof Statements.Replace && staNode.findDirectTokenByText("INTO")) {
|
|
69276
|
+
const issue = issue_1.Issue.atStatement(file, staNode, "REPLACE INTO is obsolete", this.getMetadata().key, this.conf.severity);
|
|
69277
|
+
issues.push(issue);
|
|
69278
|
+
}
|
|
69076
69279
|
if (this.conf.pack && sta instanceof Statements.Pack) {
|
|
69077
69280
|
const issue = issue_1.Issue.atStatement(file, staNode, "PACK is obsolete", this.getMetadata().key, this.conf.severity);
|
|
69078
69281
|
issues.push(issue);
|
|
69079
69282
|
}
|
|
69283
|
+
if (this.conf.fieldGroups && sta instanceof Statements.FieldGroup) {
|
|
69284
|
+
const issue = issue_1.Issue.atStatement(file, staNode, "FIELD-GROUPS is obsolete", this.getMetadata().key, this.conf.severity);
|
|
69285
|
+
issues.push(issue);
|
|
69286
|
+
}
|
|
69080
69287
|
if (this.conf.parameter && sta instanceof Statements.Parameter) {
|
|
69081
69288
|
const token = staNode.getFirstToken();
|
|
69082
69289
|
if (token.getStr().toUpperCase() === "PARAMETER") {
|
|
@@ -76738,11 +76945,7 @@ class SkipLogic {
|
|
|
76738
76945
|
var _a;
|
|
76739
76946
|
if (this.tobj === undefined) {
|
|
76740
76947
|
this.tobj = {};
|
|
76741
|
-
for (const
|
|
76742
|
-
if (obj.getType() !== "TOBJ") {
|
|
76743
|
-
continue;
|
|
76744
|
-
}
|
|
76745
|
-
const tobj = obj;
|
|
76948
|
+
for (const tobj of this.reg.getObjectsByType("TOBJ")) {
|
|
76746
76949
|
const area = (_a = tobj.getArea()) === null || _a === void 0 ? void 0 : _a.toUpperCase();
|
|
76747
76950
|
if (area) {
|
|
76748
76951
|
this.tobj[area] = true;
|
|
@@ -82296,6 +82499,9 @@ class HandleABAP {
|
|
|
82296
82499
|
if (this.options?.addFilenames === true) {
|
|
82297
82500
|
chunk.appendString("// " + file.getFilename() + "\n");
|
|
82298
82501
|
}
|
|
82502
|
+
if (file.getStructure() === undefined) {
|
|
82503
|
+
throw new Error("HandleABAP, file has no structure, probably a syntax error: " + file.getFilename());
|
|
82504
|
+
}
|
|
82299
82505
|
const rearranged = new rearranger_1.Rearranger().run(obj.getType(), file.getStructure());
|
|
82300
82506
|
const contents = new traversal_1.Traversal(spaghetti, file, obj, reg, this.options).traverse(rearranged);
|
|
82301
82507
|
chunk.appendChunk(contents);
|
|
@@ -90633,6 +90839,9 @@ class LoopTranspiler {
|
|
|
90633
90839
|
break;
|
|
90634
90840
|
}
|
|
90635
90841
|
}
|
|
90842
|
+
if (node.findDirectStatement(abaplint.Statements.Loop)?.findDirectTokenByText("GROUP") !== undefined) {
|
|
90843
|
+
return new chunk_1.Chunk(`throw new Error("transpiler todo, GROUP BY");`);
|
|
90844
|
+
}
|
|
90636
90845
|
for (const c of node.getChildren()) {
|
|
90637
90846
|
if (c instanceof abaplint.Nodes.StructureNode && c.get() instanceof abaplint.Structures.Body) {
|
|
90638
90847
|
for (const b of c.getChildren()) {
|
|
@@ -92818,8 +93027,8 @@ var isArray = Array.isArray || function (xs) {
|
|
|
92818
93027
|
\**************************************************/
|
|
92819
93028
|
/***/ ((module) => {
|
|
92820
93029
|
|
|
92821
|
-
(()=>{"use strict";var t={d:(e,n)=>{for(var i in n)t.o(n,i)&&!t.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:n[i]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};t.r(e),t.d(e,{XMLBuilder:()=>ft,XMLParser:()=>st,XMLValidator:()=>mt});const n=":A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",i=new RegExp("^["+n+"]["+n+"\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$");function s(t,e){const n=[];let i=e.exec(t);for(;i;){const s=[];s.startIndex=e.lastIndex-i[0].length;const r=i.length;for(let t=0;t<r;t++)s.push(i[t]);n.push(s),i=e.exec(t)}return n}const r=function(t){return!(null==i.exec(t))},o={allowBooleanAttributes:!1,unpairedTags:[]};function a(t,e){e=Object.assign({},o,e);const n=[];let i=!1,s=!1;"\ufeff"===t[0]&&(t=t.substr(1));for(let o=0;o<t.length;o++)if("<"===t[o]&&"?"===t[o+1]){if(o+=2,o=u(t,o),o.err)return o}else{if("<"!==t[o]){if(l(t[o]))continue;return x("InvalidChar","char '"+t[o]+"' is not expected.",N(t,o))}{let a=o;if(o++,"!"===t[o]){o=h(t,o);continue}{let d=!1;"/"===t[o]&&(d=!0,o++);let f="";for(;o<t.length&&">"!==t[o]&&" "!==t[o]&&"\t"!==t[o]&&"\n"!==t[o]&&"\r"!==t[o];o++)f+=t[o];if(f=f.trim(),"/"===f[f.length-1]&&(f=f.substring(0,f.length-1),o--),!r(f)){let e;return e=0===f.trim().length?"Invalid space after '<'.":"Tag '"+f+"' is an invalid name.",x("InvalidTag",e,N(t,o))}const p=c(t,o);if(!1===p)return x("InvalidAttr","Attributes for '"+f+"' have open quote.",N(t,o));let b=p.value;if(o=p.index,"/"===b[b.length-1]){const n=o-b.length;b=b.substring(0,b.length-1);const s=g(b,e);if(!0!==s)return x(s.err.code,s.err.msg,N(t,n+s.err.line));i=!0}else if(d){if(!p.tagClosed)return x("InvalidTag","Closing tag '"+f+"' doesn't have proper closing.",N(t,o));if(b.trim().length>0)return x("InvalidTag","Closing tag '"+f+"' can't have attributes or invalid starting.",N(t,a));if(0===n.length)return x("InvalidTag","Closing tag '"+f+"' has not been opened.",N(t,a));{const e=n.pop();if(f!==e.tagName){let n=N(t,e.tagStartPos);return x("InvalidTag","Expected closing tag '"+e.tagName+"' (opened in line "+n.line+", col "+n.col+") instead of closing tag '"+f+"'.",N(t,a))}0==n.length&&(s=!0)}}else{const r=g(b,e);if(!0!==r)return x(r.err.code,r.err.msg,N(t,o-b.length+r.err.line));if(!0===s)return x("InvalidXml","Multiple possible root nodes found.",N(t,o));-1!==e.unpairedTags.indexOf(f)||n.push({tagName:f,tagStartPos:a}),i=!0}for(o++;o<t.length;o++)if("<"===t[o]){if("!"===t[o+1]){o++,o=h(t,o);continue}if("?"!==t[o+1])break;if(o=u(t,++o),o.err)return o}else if("&"===t[o]){const e=m(t,o);if(-1==e)return x("InvalidChar","char '&' is not expected.",N(t,o));o=e}else if(!0===s&&!l(t[o]))return x("InvalidXml","Extra text at the end",N(t,o));"<"===t[o]&&o--}}}return i?1==n.length?x("InvalidTag","Unclosed tag '"+n[0].tagName+"'.",N(t,n[0].tagStartPos)):!(n.length>0)||x("InvalidXml","Invalid '"+JSON.stringify(n.map((t=>t.tagName)),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1}):x("InvalidXml","Start tag expected.",1)}function l(t){return" "===t||"\t"===t||"\n"===t||"\r"===t}function u(t,e){const n=e;for(;e<t.length;e++)if("?"!=t[e]&&" "!=t[e]);else{const i=t.substr(n,e-n);if(e>5&&"xml"===i)return x("InvalidXml","XML declaration allowed only at the start of the document.",N(t,e));if("?"==t[e]&&">"==t[e+1]){e++;break}}return e}function h(t,e){if(t.length>e+5&&"-"===t[e+1]&&"-"===t[e+2]){for(e+=3;e<t.length;e++)if("-"===t[e]&&"-"===t[e+1]&&">"===t[e+2]){e+=2;break}}else if(t.length>e+8&&"D"===t[e+1]&&"O"===t[e+2]&&"C"===t[e+3]&&"T"===t[e+4]&&"Y"===t[e+5]&&"P"===t[e+6]&&"E"===t[e+7]){let n=1;for(e+=8;e<t.length;e++)if("<"===t[e])n++;else if(">"===t[e]&&(n--,0===n))break}else if(t.length>e+9&&"["===t[e+1]&&"C"===t[e+2]&&"D"===t[e+3]&&"A"===t[e+4]&&"T"===t[e+5]&&"A"===t[e+6]&&"["===t[e+7])for(e+=8;e<t.length;e++)if("]"===t[e]&&"]"===t[e+1]&&">"===t[e+2]){e+=2;break}return e}const d='"',f="'";function c(t,e){let n="",i="",s=!1;for(;e<t.length;e++){if(t[e]===d||t[e]===f)""===i?i=t[e]:i!==t[e]||(i="");else if(">"===t[e]&&""===i){s=!0;break}n+=t[e]}return""===i&&{value:n,index:e,tagClosed:s}}const p=new RegExp("(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['\"])(([\\s\\S])*?)\\5)?","g");function g(t,e){const n=s(t,p),i={};for(let t=0;t<n.length;t++){if(0===n[t][1].length)return x("InvalidAttr","Attribute '"+n[t][2]+"' has no space in starting.",E(n[t]));if(void 0!==n[t][3]&&void 0===n[t][4])return x("InvalidAttr","Attribute '"+n[t][2]+"' is without value.",E(n[t]));if(void 0===n[t][3]&&!e.allowBooleanAttributes)return x("InvalidAttr","boolean attribute '"+n[t][2]+"' is not allowed.",E(n[t]));const s=n[t][2];if(!b(s))return x("InvalidAttr","Attribute '"+s+"' is an invalid name.",E(n[t]));if(i.hasOwnProperty(s))return x("InvalidAttr","Attribute '"+s+"' is repeated.",E(n[t]));i[s]=1}return!0}function m(t,e){if(";"===t[++e])return-1;if("#"===t[e])return function(t,e){let n=/\d/;for("x"===t[e]&&(e++,n=/[\da-fA-F]/);e<t.length;e++){if(";"===t[e])return e;if(!t[e].match(n))break}return-1}(t,++e);let n=0;for(;e<t.length;e++,n++)if(!(t[e].match(/\w/)&&n<20)){if(";"===t[e])break;return-1}return e}function x(t,e,n){return{err:{code:t,msg:e,line:n.line||n,col:n.col}}}function b(t){return r(t)}function N(t,e){const n=t.substring(0,e).split(/\r?\n/);return{line:n.length,col:n[n.length-1].length+1}}function E(t){return t.startIndex+t[1].length}const v={preserveOrder:!1,attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,removeNSPrefix:!1,allowBooleanAttributes:!1,parseTagValue:!0,parseAttributeValue:!1,trimValues:!0,cdataPropName:!1,numberParseOptions:{hex:!0,leadingZeros:!0,eNotation:!0},tagValueProcessor:function(t,e){return e},attributeValueProcessor:function(t,e){return e},stopNodes:[],alwaysCreateTextNode:!1,isArray:()=>!1,commentPropName:!1,unpairedTags:[],processEntities:!0,htmlEntities:!1,ignoreDeclaration:!1,ignorePiTags:!1,transformTagName:!1,transformAttributeName:!1,updateTag:function(t,e,n){return t},captureMetaData:!1};let y;y="function"!=typeof Symbol?"@@xmlMetadata":Symbol("XML Node Metadata");class T{constructor(t){this.tagname=t,this.child=[],this[":@"]={}}add(t,e){"__proto__"===t&&(t="#__proto__"),this.child.push({[t]:e})}addChild(t,e){"__proto__"===t.tagname&&(t.tagname="#__proto__"),t[":@"]&&Object.keys(t[":@"]).length>0?this.child.push({[t.tagname]:t.child,":@":t[":@"]}):this.child.push({[t.tagname]:t.child}),void 0!==e&&(this.child[this.child.length-1][y]={startIndex:e})}static getMetaDataSymbol(){return y}}function w(t,e){const n={};if("O"!==t[e+3]||"C"!==t[e+4]||"T"!==t[e+5]||"Y"!==t[e+6]||"P"!==t[e+7]||"E"!==t[e+8])throw new Error("Invalid Tag instead of DOCTYPE");{e+=9;let i=1,s=!1,r=!1,o="";for(;e<t.length;e++)if("<"!==t[e]||r)if(">"===t[e]){if(r?"-"===t[e-1]&&"-"===t[e-2]&&(r=!1,i--):i--,0===i)break}else"["===t[e]?s=!0:o+=t[e];else{if(s&&C(t,"!ENTITY",e)){let i,s;e+=7,[i,s,e]=O(t,e+1),-1===s.indexOf("&")&&(n[i]={regx:RegExp(`&${i};`,"g"),val:s})}else if(s&&C(t,"!ELEMENT",e)){e+=8;const{index:n}=S(t,e+1);e=n}else if(s&&C(t,"!ATTLIST",e))e+=8;else if(s&&C(t,"!NOTATION",e)){e+=9;const{index:n}=A(t,e+1);e=n}else{if(!C(t,"!--",e))throw new Error("Invalid DOCTYPE");r=!0}i++,o=""}if(0!==i)throw new Error("Unclosed DOCTYPE")}return{entities:n,i:e}}const P=(t,e)=>{for(;e<t.length&&/\s/.test(t[e]);)e++;return e};function O(t,e){e=P(t,e);let n="";for(;e<t.length&&!/\s/.test(t[e])&&'"'!==t[e]&&"'"!==t[e];)n+=t[e],e++;if($(n),e=P(t,e),"SYSTEM"===t.substring(e,e+6).toUpperCase())throw new Error("External entities are not supported");if("%"===t[e])throw new Error("Parameter entities are not supported");let i="";return[e,i]=I(t,e,"entity"),[n,i,--e]}function A(t,e){e=P(t,e);let n="";for(;e<t.length&&!/\s/.test(t[e]);)n+=t[e],e++;$(n),e=P(t,e);const i=t.substring(e,e+6).toUpperCase();if("SYSTEM"!==i&&"PUBLIC"!==i)throw new Error(`Expected SYSTEM or PUBLIC, found "${i}"`);e+=i.length,e=P(t,e);let s=null,r=null;if("PUBLIC"===i)[e,s]=I(t,e,"publicIdentifier"),'"'!==t[e=P(t,e)]&&"'"!==t[e]||([e,r]=I(t,e,"systemIdentifier"));else if("SYSTEM"===i&&([e,r]=I(t,e,"systemIdentifier"),!r))throw new Error("Missing mandatory system identifier for SYSTEM notation");return{notationName:n,publicIdentifier:s,systemIdentifier:r,index:--e}}function I(t,e,n){let i="";const s=t[e];if('"'!==s&&"'"!==s)throw new Error(`Expected quoted string, found "${s}"`);for(e++;e<t.length&&t[e]!==s;)i+=t[e],e++;if(t[e]!==s)throw new Error(`Unterminated ${n} value`);return[++e,i]}function S(t,e){e=P(t,e);let n="";for(;e<t.length&&!/\s/.test(t[e]);)n+=t[e],e++;if(!$(n))throw new Error(`Invalid element name: "${n}"`);let i="";if("E"===t[e=P(t,e)]&&C(t,"MPTY",e))e+=4;else if("A"===t[e]&&C(t,"NY",e))e+=2;else{if("("!==t[e])throw new Error(`Invalid Element Expression, found "${t[e]}"`);for(e++;e<t.length&&")"!==t[e];)i+=t[e],e++;if(")"!==t[e])throw new Error("Unterminated content model")}return{elementName:n,contentModel:i.trim(),index:e}}function C(t,e,n){for(let i=0;i<e.length;i++)if(e[i]!==t[n+i+1])return!1;return!0}function $(t){if(r(t))return t;throw new Error(`Invalid entity name ${t}`)}const j=/^[-+]?0x[a-fA-F0-9]+$/,D=/^([\-\+])?(0*)([0-9]*(\.[0-9]*)?)$/,V={hex:!0,leadingZeros:!0,decimalPoint:".",eNotation:!0};const M=/^([-+])?(0*)(\d*(\.\d*)?[eE][-\+]?\d+)$/;function _(t){return"function"==typeof t?t:Array.isArray(t)?e=>{for(const n of t){if("string"==typeof n&&e===n)return!0;if(n instanceof RegExp&&n.test(e))return!0}}:()=>!1}class k{constructor(t){this.options=t,this.currentNode=null,this.tagsNodeStack=[],this.docTypeEntities={},this.lastEntities={apos:{regex:/&(apos|#39|#x27);/g,val:"'"},gt:{regex:/&(gt|#62|#x3E);/g,val:">"},lt:{regex:/&(lt|#60|#x3C);/g,val:"<"},quot:{regex:/&(quot|#34|#x22);/g,val:'"'}},this.ampEntity={regex:/&(amp|#38|#x26);/g,val:"&"},this.htmlEntities={space:{regex:/&(nbsp|#160);/g,val:" "},cent:{regex:/&(cent|#162);/g,val:"¢"},pound:{regex:/&(pound|#163);/g,val:"£"},yen:{regex:/&(yen|#165);/g,val:"¥"},euro:{regex:/&(euro|#8364);/g,val:"€"},copyright:{regex:/&(copy|#169);/g,val:"©"},reg:{regex:/&(reg|#174);/g,val:"®"},inr:{regex:/&(inr|#8377);/g,val:"₹"},num_dec:{regex:/&#([0-9]{1,7});/g,val:(t,e)=>String.fromCodePoint(Number.parseInt(e,10))},num_hex:{regex:/&#x([0-9a-fA-F]{1,6});/g,val:(t,e)=>String.fromCodePoint(Number.parseInt(e,16))}},this.addExternalEntities=F,this.parseXml=X,this.parseTextData=L,this.resolveNameSpace=B,this.buildAttributesMap=G,this.isItStopNode=Z,this.replaceEntitiesValue=R,this.readStopNodeData=J,this.saveTextToParentTag=q,this.addChild=Y,this.ignoreAttributesFn=_(this.options.ignoreAttributes)}}function F(t){const e=Object.keys(t);for(let n=0;n<e.length;n++){const i=e[n];this.lastEntities[i]={regex:new RegExp("&"+i+";","g"),val:t[i]}}}function L(t,e,n,i,s,r,o){if(void 0!==t&&(this.options.trimValues&&!i&&(t=t.trim()),t.length>0)){o||(t=this.replaceEntitiesValue(t));const i=this.options.tagValueProcessor(e,t,n,s,r);return null==i?t:typeof i!=typeof t||i!==t?i:this.options.trimValues||t.trim()===t?H(t,this.options.parseTagValue,this.options.numberParseOptions):t}}function B(t){if(this.options.removeNSPrefix){const e=t.split(":"),n="/"===t.charAt(0)?"/":"";if("xmlns"===e[0])return"";2===e.length&&(t=n+e[1])}return t}const U=new RegExp("([^\\s=]+)\\s*(=\\s*(['\"])([\\s\\S]*?)\\3)?","gm");function G(t,e,n){if(!0!==this.options.ignoreAttributes&&"string"==typeof t){const n=s(t,U),i=n.length,r={};for(let t=0;t<i;t++){const i=this.resolveNameSpace(n[t][1]);if(this.ignoreAttributesFn(i,e))continue;let s=n[t][4],o=this.options.attributeNamePrefix+i;if(i.length)if(this.options.transformAttributeName&&(o=this.options.transformAttributeName(o)),"__proto__"===o&&(o="#__proto__"),void 0!==s){this.options.trimValues&&(s=s.trim()),s=this.replaceEntitiesValue(s);const t=this.options.attributeValueProcessor(i,s,e);r[o]=null==t?s:typeof t!=typeof s||t!==s?t:H(s,this.options.parseAttributeValue,this.options.numberParseOptions)}else this.options.allowBooleanAttributes&&(r[o]=!0)}if(!Object.keys(r).length)return;if(this.options.attributesGroupName){const t={};return t[this.options.attributesGroupName]=r,t}return r}}const X=function(t){t=t.replace(/\r\n?/g,"\n");const e=new T("!xml");let n=e,i="",s="";for(let r=0;r<t.length;r++)if("<"===t[r])if("/"===t[r+1]){const e=W(t,">",r,"Closing Tag is not closed.");let o=t.substring(r+2,e).trim();if(this.options.removeNSPrefix){const t=o.indexOf(":");-1!==t&&(o=o.substr(t+1))}this.options.transformTagName&&(o=this.options.transformTagName(o)),n&&(i=this.saveTextToParentTag(i,n,s));const a=s.substring(s.lastIndexOf(".")+1);if(o&&-1!==this.options.unpairedTags.indexOf(o))throw new Error(`Unpaired tag can not be used as closing tag: </${o}>`);let l=0;a&&-1!==this.options.unpairedTags.indexOf(a)?(l=s.lastIndexOf(".",s.lastIndexOf(".")-1),this.tagsNodeStack.pop()):l=s.lastIndexOf("."),s=s.substring(0,l),n=this.tagsNodeStack.pop(),i="",r=e}else if("?"===t[r+1]){let e=z(t,r,!1,"?>");if(!e)throw new Error("Pi Tag is not closed.");if(i=this.saveTextToParentTag(i,n,s),this.options.ignoreDeclaration&&"?xml"===e.tagName||this.options.ignorePiTags);else{const t=new T(e.tagName);t.add(this.options.textNodeName,""),e.tagName!==e.tagExp&&e.attrExpPresent&&(t[":@"]=this.buildAttributesMap(e.tagExp,s,e.tagName)),this.addChild(n,t,s,r)}r=e.closeIndex+1}else if("!--"===t.substr(r+1,3)){const e=W(t,"--\x3e",r+4,"Comment is not closed.");if(this.options.commentPropName){const o=t.substring(r+4,e-2);i=this.saveTextToParentTag(i,n,s),n.add(this.options.commentPropName,[{[this.options.textNodeName]:o}])}r=e}else if("!D"===t.substr(r+1,2)){const e=w(t,r);this.docTypeEntities=e.entities,r=e.i}else if("!["===t.substr(r+1,2)){const e=W(t,"]]>",r,"CDATA is not closed.")-2,o=t.substring(r+9,e);i=this.saveTextToParentTag(i,n,s);let a=this.parseTextData(o,n.tagname,s,!0,!1,!0,!0);null==a&&(a=""),this.options.cdataPropName?n.add(this.options.cdataPropName,[{[this.options.textNodeName]:o}]):n.add(this.options.textNodeName,a),r=e+2}else{let o=z(t,r,this.options.removeNSPrefix),a=o.tagName;const l=o.rawTagName;let u=o.tagExp,h=o.attrExpPresent,d=o.closeIndex;this.options.transformTagName&&(a=this.options.transformTagName(a)),n&&i&&"!xml"!==n.tagname&&(i=this.saveTextToParentTag(i,n,s,!1));const f=n;f&&-1!==this.options.unpairedTags.indexOf(f.tagname)&&(n=this.tagsNodeStack.pop(),s=s.substring(0,s.lastIndexOf("."))),a!==e.tagname&&(s+=s?"."+a:a);const c=r;if(this.isItStopNode(this.options.stopNodes,s,a)){let e="";if(u.length>0&&u.lastIndexOf("/")===u.length-1)"/"===a[a.length-1]?(a=a.substr(0,a.length-1),s=s.substr(0,s.length-1),u=a):u=u.substr(0,u.length-1),r=o.closeIndex;else if(-1!==this.options.unpairedTags.indexOf(a))r=o.closeIndex;else{const n=this.readStopNodeData(t,l,d+1);if(!n)throw new Error(`Unexpected end of ${l}`);r=n.i,e=n.tagContent}const i=new T(a);a!==u&&h&&(i[":@"]=this.buildAttributesMap(u,s,a)),e&&(e=this.parseTextData(e,a,s,!0,h,!0,!0)),s=s.substr(0,s.lastIndexOf(".")),i.add(this.options.textNodeName,e),this.addChild(n,i,s,c)}else{if(u.length>0&&u.lastIndexOf("/")===u.length-1){"/"===a[a.length-1]?(a=a.substr(0,a.length-1),s=s.substr(0,s.length-1),u=a):u=u.substr(0,u.length-1),this.options.transformTagName&&(a=this.options.transformTagName(a));const t=new T(a);a!==u&&h&&(t[":@"]=this.buildAttributesMap(u,s,a)),this.addChild(n,t,s,c),s=s.substr(0,s.lastIndexOf("."))}else{const t=new T(a);this.tagsNodeStack.push(n),a!==u&&h&&(t[":@"]=this.buildAttributesMap(u,s,a)),this.addChild(n,t,s,c),n=t}i="",r=d}}else i+=t[r];return e.child};function Y(t,e,n,i){this.options.captureMetaData||(i=void 0);const s=this.options.updateTag(e.tagname,n,e[":@"]);!1===s||("string"==typeof s?(e.tagname=s,t.addChild(e,i)):t.addChild(e,i))}const R=function(t){if(this.options.processEntities){for(let e in this.docTypeEntities){const n=this.docTypeEntities[e];t=t.replace(n.regx,n.val)}for(let e in this.lastEntities){const n=this.lastEntities[e];t=t.replace(n.regex,n.val)}if(this.options.htmlEntities)for(let e in this.htmlEntities){const n=this.htmlEntities[e];t=t.replace(n.regex,n.val)}t=t.replace(this.ampEntity.regex,this.ampEntity.val)}return t};function q(t,e,n,i){return t&&(void 0===i&&(i=0===e.child.length),void 0!==(t=this.parseTextData(t,e.tagname,n,!1,!!e[":@"]&&0!==Object.keys(e[":@"]).length,i))&&""!==t&&e.add(this.options.textNodeName,t),t=""),t}function Z(t,e,n){const i="*."+n;for(const n in t){const s=t[n];if(i===s||e===s)return!0}return!1}function W(t,e,n,i){const s=t.indexOf(e,n);if(-1===s)throw new Error(i);return s+e.length-1}function z(t,e,n,i=">"){const s=function(t,e,n=">"){let i,s="";for(let r=e;r<t.length;r++){let e=t[r];if(i)e===i&&(i="");else if('"'===e||"'"===e)i=e;else if(e===n[0]){if(!n[1])return{data:s,index:r};if(t[r+1]===n[1])return{data:s,index:r}}else"\t"===e&&(e=" ");s+=e}}(t,e+1,i);if(!s)return;let r=s.data;const o=s.index,a=r.search(/\s/);let l=r,u=!0;-1!==a&&(l=r.substring(0,a),r=r.substring(a+1).trimStart());const h=l;if(n){const t=l.indexOf(":");-1!==t&&(l=l.substr(t+1),u=l!==s.data.substr(t+1))}return{tagName:l,tagExp:r,closeIndex:o,attrExpPresent:u,rawTagName:h}}function J(t,e,n){const i=n;let s=1;for(;n<t.length;n++)if("<"===t[n])if("/"===t[n+1]){const r=W(t,">",n,`${e} is not closed`);if(t.substring(n+2,r).trim()===e&&(s--,0===s))return{tagContent:t.substring(i,n),i:r};n=r}else if("?"===t[n+1])n=W(t,"?>",n+1,"StopNode is not closed.");else if("!--"===t.substr(n+1,3))n=W(t,"--\x3e",n+3,"StopNode is not closed.");else if("!["===t.substr(n+1,2))n=W(t,"]]>",n,"StopNode is not closed.")-2;else{const i=z(t,n,">");i&&((i&&i.tagName)===e&&"/"!==i.tagExp[i.tagExp.length-1]&&s++,n=i.closeIndex)}}function H(t,e,n){if(e&&"string"==typeof t){const e=t.trim();return"true"===e||"false"!==e&&function(t,e={}){if(e=Object.assign({},V,e),!t||"string"!=typeof t)return t;let n=t.trim();if(void 0!==e.skipLike&&e.skipLike.test(n))return t;if("0"===t)return 0;if(e.hex&&j.test(n))return function(t){if(parseInt)return parseInt(t,16);if(Number.parseInt)return Number.parseInt(t,16);if(window&&window.parseInt)return window.parseInt(t,16);throw new Error("parseInt, Number.parseInt, window.parseInt are not supported")}(n);if(-1!==n.search(/.+[eE].+/))return function(t,e,n){if(!n.eNotation)return t;const i=e.match(M);if(i){let s=i[1]||"";const r=-1===i[3].indexOf("e")?"E":"e",o=i[2],a=s?t[o.length+1]===r:t[o.length]===r;return o.length>1&&a?t:1!==o.length||!i[3].startsWith(`.${r}`)&&i[3][0]!==r?n.leadingZeros&&!a?(e=(i[1]||"")+i[3],Number(e)):t:Number(e)}return t}(t,n,e);{const s=D.exec(n);if(s){const r=s[1]||"",o=s[2];let a=(i=s[3])&&-1!==i.indexOf(".")?("."===(i=i.replace(/0+$/,""))?i="0":"."===i[0]?i="0"+i:"."===i[i.length-1]&&(i=i.substring(0,i.length-1)),i):i;const l=r?"."===t[o.length+1]:"."===t[o.length];if(!e.leadingZeros&&(o.length>1||1===o.length&&!l))return t;{const i=Number(n),s=String(i);if(0===i||-0===i)return i;if(-1!==s.search(/[eE]/))return e.eNotation?i:t;if(-1!==n.indexOf("."))return"0"===s||s===a||s===`${r}${a}`?i:t;let l=o?a:n;return o?l===s||r+l===s?i:t:l===s||l===r+s?i:t}}return t}// removed by dead control flow
|
|
92822
|
-
var i; }(t,n)}return void 0!==t?t:""}const
|
|
93030
|
+
(()=>{"use strict";var t={d:(e,n)=>{for(var i in n)t.o(n,i)&&!t.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:n[i]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};t.r(e),t.d(e,{XMLBuilder:()=>lt,XMLParser:()=>tt,XMLValidator:()=>pt});const n=":A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",i=new RegExp("^["+n+"]["+n+"\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$");function r(t,e){const n=[];let i=e.exec(t);for(;i;){const r=[];r.startIndex=e.lastIndex-i[0].length;const s=i.length;for(let t=0;t<s;t++)r.push(i[t]);n.push(r),i=e.exec(t)}return n}const s=function(t){return!(null==i.exec(t))},o={allowBooleanAttributes:!1,unpairedTags:[]};function a(t,e){e=Object.assign({},o,e);const n=[];let i=!1,r=!1;"\ufeff"===t[0]&&(t=t.substr(1));for(let o=0;o<t.length;o++)if("<"===t[o]&&"?"===t[o+1]){if(o+=2,o=u(t,o),o.err)return o}else{if("<"!==t[o]){if(l(t[o]))continue;return x("InvalidChar","char '"+t[o]+"' is not expected.",N(t,o))}{let a=o;if(o++,"!"===t[o]){o=h(t,o);continue}{let d=!1;"/"===t[o]&&(d=!0,o++);let p="";for(;o<t.length&&">"!==t[o]&&" "!==t[o]&&"\t"!==t[o]&&"\n"!==t[o]&&"\r"!==t[o];o++)p+=t[o];if(p=p.trim(),"/"===p[p.length-1]&&(p=p.substring(0,p.length-1),o--),!s(p)){let e;return e=0===p.trim().length?"Invalid space after '<'.":"Tag '"+p+"' is an invalid name.",x("InvalidTag",e,N(t,o))}const c=f(t,o);if(!1===c)return x("InvalidAttr","Attributes for '"+p+"' have open quote.",N(t,o));let b=c.value;if(o=c.index,"/"===b[b.length-1]){const n=o-b.length;b=b.substring(0,b.length-1);const r=g(b,e);if(!0!==r)return x(r.err.code,r.err.msg,N(t,n+r.err.line));i=!0}else if(d){if(!c.tagClosed)return x("InvalidTag","Closing tag '"+p+"' doesn't have proper closing.",N(t,o));if(b.trim().length>0)return x("InvalidTag","Closing tag '"+p+"' can't have attributes or invalid starting.",N(t,a));if(0===n.length)return x("InvalidTag","Closing tag '"+p+"' has not been opened.",N(t,a));{const e=n.pop();if(p!==e.tagName){let n=N(t,e.tagStartPos);return x("InvalidTag","Expected closing tag '"+e.tagName+"' (opened in line "+n.line+", col "+n.col+") instead of closing tag '"+p+"'.",N(t,a))}0==n.length&&(r=!0)}}else{const s=g(b,e);if(!0!==s)return x(s.err.code,s.err.msg,N(t,o-b.length+s.err.line));if(!0===r)return x("InvalidXml","Multiple possible root nodes found.",N(t,o));-1!==e.unpairedTags.indexOf(p)||n.push({tagName:p,tagStartPos:a}),i=!0}for(o++;o<t.length;o++)if("<"===t[o]){if("!"===t[o+1]){o++,o=h(t,o);continue}if("?"!==t[o+1])break;if(o=u(t,++o),o.err)return o}else if("&"===t[o]){const e=m(t,o);if(-1==e)return x("InvalidChar","char '&' is not expected.",N(t,o));o=e}else if(!0===r&&!l(t[o]))return x("InvalidXml","Extra text at the end",N(t,o));"<"===t[o]&&o--}}}return i?1==n.length?x("InvalidTag","Unclosed tag '"+n[0].tagName+"'.",N(t,n[0].tagStartPos)):!(n.length>0)||x("InvalidXml","Invalid '"+JSON.stringify(n.map((t=>t.tagName)),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1}):x("InvalidXml","Start tag expected.",1)}function l(t){return" "===t||"\t"===t||"\n"===t||"\r"===t}function u(t,e){const n=e;for(;e<t.length;e++)if("?"!=t[e]&&" "!=t[e]);else{const i=t.substr(n,e-n);if(e>5&&"xml"===i)return x("InvalidXml","XML declaration allowed only at the start of the document.",N(t,e));if("?"==t[e]&&">"==t[e+1]){e++;break}}return e}function h(t,e){if(t.length>e+5&&"-"===t[e+1]&&"-"===t[e+2]){for(e+=3;e<t.length;e++)if("-"===t[e]&&"-"===t[e+1]&&">"===t[e+2]){e+=2;break}}else if(t.length>e+8&&"D"===t[e+1]&&"O"===t[e+2]&&"C"===t[e+3]&&"T"===t[e+4]&&"Y"===t[e+5]&&"P"===t[e+6]&&"E"===t[e+7]){let n=1;for(e+=8;e<t.length;e++)if("<"===t[e])n++;else if(">"===t[e]&&(n--,0===n))break}else if(t.length>e+9&&"["===t[e+1]&&"C"===t[e+2]&&"D"===t[e+3]&&"A"===t[e+4]&&"T"===t[e+5]&&"A"===t[e+6]&&"["===t[e+7])for(e+=8;e<t.length;e++)if("]"===t[e]&&"]"===t[e+1]&&">"===t[e+2]){e+=2;break}return e}const d='"',p="'";function f(t,e){let n="",i="",r=!1;for(;e<t.length;e++){if(t[e]===d||t[e]===p)""===i?i=t[e]:i!==t[e]||(i="");else if(">"===t[e]&&""===i){r=!0;break}n+=t[e]}return""===i&&{value:n,index:e,tagClosed:r}}const c=new RegExp("(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['\"])(([\\s\\S])*?)\\5)?","g");function g(t,e){const n=r(t,c),i={};for(let t=0;t<n.length;t++){if(0===n[t][1].length)return x("InvalidAttr","Attribute '"+n[t][2]+"' has no space in starting.",E(n[t]));if(void 0!==n[t][3]&&void 0===n[t][4])return x("InvalidAttr","Attribute '"+n[t][2]+"' is without value.",E(n[t]));if(void 0===n[t][3]&&!e.allowBooleanAttributes)return x("InvalidAttr","boolean attribute '"+n[t][2]+"' is not allowed.",E(n[t]));const r=n[t][2];if(!b(r))return x("InvalidAttr","Attribute '"+r+"' is an invalid name.",E(n[t]));if(i.hasOwnProperty(r))return x("InvalidAttr","Attribute '"+r+"' is repeated.",E(n[t]));i[r]=1}return!0}function m(t,e){if(";"===t[++e])return-1;if("#"===t[e])return function(t,e){let n=/\d/;for("x"===t[e]&&(e++,n=/[\da-fA-F]/);e<t.length;e++){if(";"===t[e])return e;if(!t[e].match(n))break}return-1}(t,++e);let n=0;for(;e<t.length;e++,n++)if(!(t[e].match(/\w/)&&n<20)){if(";"===t[e])break;return-1}return e}function x(t,e,n){return{err:{code:t,msg:e,line:n.line||n,col:n.col}}}function b(t){return s(t)}function N(t,e){const n=t.substring(0,e).split(/\r?\n/);return{line:n.length,col:n[n.length-1].length+1}}function E(t){return t.startIndex+t[1].length}const v={preserveOrder:!1,attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,removeNSPrefix:!1,allowBooleanAttributes:!1,parseTagValue:!0,parseAttributeValue:!1,trimValues:!0,cdataPropName:!1,numberParseOptions:{hex:!0,leadingZeros:!0,eNotation:!0},tagValueProcessor:function(t,e){return e},attributeValueProcessor:function(t,e){return e},stopNodes:[],alwaysCreateTextNode:!1,isArray:()=>!1,commentPropName:!1,unpairedTags:[],processEntities:!0,htmlEntities:!1,ignoreDeclaration:!1,ignorePiTags:!1,transformTagName:!1,transformAttributeName:!1,updateTag:function(t,e,n){return t},captureMetaData:!1};let T;T="function"!=typeof Symbol?"@@xmlMetadata":Symbol("XML Node Metadata");class y{constructor(t){this.tagname=t,this.child=[],this[":@"]={}}add(t,e){"__proto__"===t&&(t="#__proto__"),this.child.push({[t]:e})}addChild(t,e){"__proto__"===t.tagname&&(t.tagname="#__proto__"),t[":@"]&&Object.keys(t[":@"]).length>0?this.child.push({[t.tagname]:t.child,":@":t[":@"]}):this.child.push({[t.tagname]:t.child}),void 0!==e&&(this.child[this.child.length-1][T]={startIndex:e})}static getMetaDataSymbol(){return T}}class w{constructor(t){this.suppressValidationErr=!t}readDocType(t,e){const n={};if("O"!==t[e+3]||"C"!==t[e+4]||"T"!==t[e+5]||"Y"!==t[e+6]||"P"!==t[e+7]||"E"!==t[e+8])throw new Error("Invalid Tag instead of DOCTYPE");{e+=9;let i=1,r=!1,s=!1,o="";for(;e<t.length;e++)if("<"!==t[e]||s)if(">"===t[e]){if(s?"-"===t[e-1]&&"-"===t[e-2]&&(s=!1,i--):i--,0===i)break}else"["===t[e]?r=!0:o+=t[e];else{if(r&&P(t,"!ENTITY",e)){let i,r;e+=7,[i,r,e]=this.readEntityExp(t,e+1,this.suppressValidationErr),-1===r.indexOf("&")&&(n[i]={regx:RegExp(`&${i};`,"g"),val:r})}else if(r&&P(t,"!ELEMENT",e)){e+=8;const{index:n}=this.readElementExp(t,e+1);e=n}else if(r&&P(t,"!ATTLIST",e))e+=8;else if(r&&P(t,"!NOTATION",e)){e+=9;const{index:n}=this.readNotationExp(t,e+1,this.suppressValidationErr);e=n}else{if(!P(t,"!--",e))throw new Error("Invalid DOCTYPE");s=!0}i++,o=""}if(0!==i)throw new Error("Unclosed DOCTYPE")}return{entities:n,i:e}}readEntityExp(t,e){e=I(t,e);let n="";for(;e<t.length&&!/\s/.test(t[e])&&'"'!==t[e]&&"'"!==t[e];)n+=t[e],e++;if(O(n),e=I(t,e),!this.suppressValidationErr){if("SYSTEM"===t.substring(e,e+6).toUpperCase())throw new Error("External entities are not supported");if("%"===t[e])throw new Error("Parameter entities are not supported")}let i="";return[e,i]=this.readIdentifierVal(t,e,"entity"),[n,i,--e]}readNotationExp(t,e){e=I(t,e);let n="";for(;e<t.length&&!/\s/.test(t[e]);)n+=t[e],e++;!this.suppressValidationErr&&O(n),e=I(t,e);const i=t.substring(e,e+6).toUpperCase();if(!this.suppressValidationErr&&"SYSTEM"!==i&&"PUBLIC"!==i)throw new Error(`Expected SYSTEM or PUBLIC, found "${i}"`);e+=i.length,e=I(t,e);let r=null,s=null;if("PUBLIC"===i)[e,r]=this.readIdentifierVal(t,e,"publicIdentifier"),'"'!==t[e=I(t,e)]&&"'"!==t[e]||([e,s]=this.readIdentifierVal(t,e,"systemIdentifier"));else if("SYSTEM"===i&&([e,s]=this.readIdentifierVal(t,e,"systemIdentifier"),!this.suppressValidationErr&&!s))throw new Error("Missing mandatory system identifier for SYSTEM notation");return{notationName:n,publicIdentifier:r,systemIdentifier:s,index:--e}}readIdentifierVal(t,e,n){let i="";const r=t[e];if('"'!==r&&"'"!==r)throw new Error(`Expected quoted string, found "${r}"`);for(e++;e<t.length&&t[e]!==r;)i+=t[e],e++;if(t[e]!==r)throw new Error(`Unterminated ${n} value`);return[++e,i]}readElementExp(t,e){e=I(t,e);let n="";for(;e<t.length&&!/\s/.test(t[e]);)n+=t[e],e++;if(!this.suppressValidationErr&&!s(n))throw new Error(`Invalid element name: "${n}"`);let i="";if("E"===t[e=I(t,e)]&&P(t,"MPTY",e))e+=4;else if("A"===t[e]&&P(t,"NY",e))e+=2;else if("("===t[e]){for(e++;e<t.length&&")"!==t[e];)i+=t[e],e++;if(")"!==t[e])throw new Error("Unterminated content model")}else if(!this.suppressValidationErr)throw new Error(`Invalid Element Expression, found "${t[e]}"`);return{elementName:n,contentModel:i.trim(),index:e}}readAttlistExp(t,e){e=I(t,e);let n="";for(;e<t.length&&!/\s/.test(t[e]);)n+=t[e],e++;O(n),e=I(t,e);let i="";for(;e<t.length&&!/\s/.test(t[e]);)i+=t[e],e++;if(!O(i))throw new Error(`Invalid attribute name: "${i}"`);e=I(t,e);let r="";if("NOTATION"===t.substring(e,e+8).toUpperCase()){if(r="NOTATION","("!==t[e=I(t,e+=8)])throw new Error(`Expected '(', found "${t[e]}"`);e++;let n=[];for(;e<t.length&&")"!==t[e];){let i="";for(;e<t.length&&"|"!==t[e]&&")"!==t[e];)i+=t[e],e++;if(i=i.trim(),!O(i))throw new Error(`Invalid notation name: "${i}"`);n.push(i),"|"===t[e]&&(e++,e=I(t,e))}if(")"!==t[e])throw new Error("Unterminated list of notations");e++,r+=" ("+n.join("|")+")"}else{for(;e<t.length&&!/\s/.test(t[e]);)r+=t[e],e++;const n=["CDATA","ID","IDREF","IDREFS","ENTITY","ENTITIES","NMTOKEN","NMTOKENS"];if(!this.suppressValidationErr&&!n.includes(r.toUpperCase()))throw new Error(`Invalid attribute type: "${r}"`)}e=I(t,e);let s="";return"#REQUIRED"===t.substring(e,e+8).toUpperCase()?(s="#REQUIRED",e+=8):"#IMPLIED"===t.substring(e,e+7).toUpperCase()?(s="#IMPLIED",e+=7):[e,s]=this.readIdentifierVal(t,e,"ATTLIST"),{elementName:n,attributeName:i,attributeType:r,defaultValue:s,index:e}}}const I=(t,e)=>{for(;e<t.length&&/\s/.test(t[e]);)e++;return e};function P(t,e,n){for(let i=0;i<e.length;i++)if(e[i]!==t[n+i+1])return!1;return!0}function O(t){if(s(t))return t;throw new Error(`Invalid entity name ${t}`)}const A=/^[-+]?0x[a-fA-F0-9]+$/,S=/^([\-\+])?(0*)([0-9]*(\.[0-9]*)?)$/,C={hex:!0,leadingZeros:!0,decimalPoint:".",eNotation:!0};const V=/^([-+])?(0*)(\d*(\.\d*)?[eE][-\+]?\d+)$/;function $(t){return"function"==typeof t?t:Array.isArray(t)?e=>{for(const n of t){if("string"==typeof n&&e===n)return!0;if(n instanceof RegExp&&n.test(e))return!0}}:()=>!1}class D{constructor(t){this.options=t,this.currentNode=null,this.tagsNodeStack=[],this.docTypeEntities={},this.lastEntities={apos:{regex:/&(apos|#39|#x27);/g,val:"'"},gt:{regex:/&(gt|#62|#x3E);/g,val:">"},lt:{regex:/&(lt|#60|#x3C);/g,val:"<"},quot:{regex:/&(quot|#34|#x22);/g,val:'"'}},this.ampEntity={regex:/&(amp|#38|#x26);/g,val:"&"},this.htmlEntities={space:{regex:/&(nbsp|#160);/g,val:" "},cent:{regex:/&(cent|#162);/g,val:"¢"},pound:{regex:/&(pound|#163);/g,val:"£"},yen:{regex:/&(yen|#165);/g,val:"¥"},euro:{regex:/&(euro|#8364);/g,val:"€"},copyright:{regex:/&(copy|#169);/g,val:"©"},reg:{regex:/&(reg|#174);/g,val:"®"},inr:{regex:/&(inr|#8377);/g,val:"₹"},num_dec:{regex:/&#([0-9]{1,7});/g,val:(t,e)=>String.fromCodePoint(Number.parseInt(e,10))},num_hex:{regex:/&#x([0-9a-fA-F]{1,6});/g,val:(t,e)=>String.fromCodePoint(Number.parseInt(e,16))}},this.addExternalEntities=j,this.parseXml=L,this.parseTextData=M,this.resolveNameSpace=F,this.buildAttributesMap=k,this.isItStopNode=Y,this.replaceEntitiesValue=B,this.readStopNodeData=q,this.saveTextToParentTag=R,this.addChild=U,this.ignoreAttributesFn=$(this.options.ignoreAttributes)}}function j(t){const e=Object.keys(t);for(let n=0;n<e.length;n++){const i=e[n];this.lastEntities[i]={regex:new RegExp("&"+i+";","g"),val:t[i]}}}function M(t,e,n,i,r,s,o){if(void 0!==t&&(this.options.trimValues&&!i&&(t=t.trim()),t.length>0)){o||(t=this.replaceEntitiesValue(t));const i=this.options.tagValueProcessor(e,t,n,r,s);return null==i?t:typeof i!=typeof t||i!==t?i:this.options.trimValues||t.trim()===t?Z(t,this.options.parseTagValue,this.options.numberParseOptions):t}}function F(t){if(this.options.removeNSPrefix){const e=t.split(":"),n="/"===t.charAt(0)?"/":"";if("xmlns"===e[0])return"";2===e.length&&(t=n+e[1])}return t}const _=new RegExp("([^\\s=]+)\\s*(=\\s*(['\"])([\\s\\S]*?)\\3)?","gm");function k(t,e,n){if(!0!==this.options.ignoreAttributes&&"string"==typeof t){const n=r(t,_),i=n.length,s={};for(let t=0;t<i;t++){const i=this.resolveNameSpace(n[t][1]);if(this.ignoreAttributesFn(i,e))continue;let r=n[t][4],o=this.options.attributeNamePrefix+i;if(i.length)if(this.options.transformAttributeName&&(o=this.options.transformAttributeName(o)),"__proto__"===o&&(o="#__proto__"),void 0!==r){this.options.trimValues&&(r=r.trim()),r=this.replaceEntitiesValue(r);const t=this.options.attributeValueProcessor(i,r,e);s[o]=null==t?r:typeof t!=typeof r||t!==r?t:Z(r,this.options.parseAttributeValue,this.options.numberParseOptions)}else this.options.allowBooleanAttributes&&(s[o]=!0)}if(!Object.keys(s).length)return;if(this.options.attributesGroupName){const t={};return t[this.options.attributesGroupName]=s,t}return s}}const L=function(t){t=t.replace(/\r\n?/g,"\n");const e=new y("!xml");let n=e,i="",r="";const s=new w(this.options.processEntities);for(let o=0;o<t.length;o++)if("<"===t[o])if("/"===t[o+1]){const e=G(t,">",o,"Closing Tag is not closed.");let s=t.substring(o+2,e).trim();if(this.options.removeNSPrefix){const t=s.indexOf(":");-1!==t&&(s=s.substr(t+1))}this.options.transformTagName&&(s=this.options.transformTagName(s)),n&&(i=this.saveTextToParentTag(i,n,r));const a=r.substring(r.lastIndexOf(".")+1);if(s&&-1!==this.options.unpairedTags.indexOf(s))throw new Error(`Unpaired tag can not be used as closing tag: </${s}>`);let l=0;a&&-1!==this.options.unpairedTags.indexOf(a)?(l=r.lastIndexOf(".",r.lastIndexOf(".")-1),this.tagsNodeStack.pop()):l=r.lastIndexOf("."),r=r.substring(0,l),n=this.tagsNodeStack.pop(),i="",o=e}else if("?"===t[o+1]){let e=X(t,o,!1,"?>");if(!e)throw new Error("Pi Tag is not closed.");if(i=this.saveTextToParentTag(i,n,r),this.options.ignoreDeclaration&&"?xml"===e.tagName||this.options.ignorePiTags);else{const t=new y(e.tagName);t.add(this.options.textNodeName,""),e.tagName!==e.tagExp&&e.attrExpPresent&&(t[":@"]=this.buildAttributesMap(e.tagExp,r,e.tagName)),this.addChild(n,t,r,o)}o=e.closeIndex+1}else if("!--"===t.substr(o+1,3)){const e=G(t,"--\x3e",o+4,"Comment is not closed.");if(this.options.commentPropName){const s=t.substring(o+4,e-2);i=this.saveTextToParentTag(i,n,r),n.add(this.options.commentPropName,[{[this.options.textNodeName]:s}])}o=e}else if("!D"===t.substr(o+1,2)){const e=s.readDocType(t,o);this.docTypeEntities=e.entities,o=e.i}else if("!["===t.substr(o+1,2)){const e=G(t,"]]>",o,"CDATA is not closed.")-2,s=t.substring(o+9,e);i=this.saveTextToParentTag(i,n,r);let a=this.parseTextData(s,n.tagname,r,!0,!1,!0,!0);null==a&&(a=""),this.options.cdataPropName?n.add(this.options.cdataPropName,[{[this.options.textNodeName]:s}]):n.add(this.options.textNodeName,a),o=e+2}else{let s=X(t,o,this.options.removeNSPrefix),a=s.tagName;const l=s.rawTagName;let u=s.tagExp,h=s.attrExpPresent,d=s.closeIndex;this.options.transformTagName&&(a=this.options.transformTagName(a)),n&&i&&"!xml"!==n.tagname&&(i=this.saveTextToParentTag(i,n,r,!1));const p=n;p&&-1!==this.options.unpairedTags.indexOf(p.tagname)&&(n=this.tagsNodeStack.pop(),r=r.substring(0,r.lastIndexOf("."))),a!==e.tagname&&(r+=r?"."+a:a);const f=o;if(this.isItStopNode(this.options.stopNodes,r,a)){let e="";if(u.length>0&&u.lastIndexOf("/")===u.length-1)"/"===a[a.length-1]?(a=a.substr(0,a.length-1),r=r.substr(0,r.length-1),u=a):u=u.substr(0,u.length-1),o=s.closeIndex;else if(-1!==this.options.unpairedTags.indexOf(a))o=s.closeIndex;else{const n=this.readStopNodeData(t,l,d+1);if(!n)throw new Error(`Unexpected end of ${l}`);o=n.i,e=n.tagContent}const i=new y(a);a!==u&&h&&(i[":@"]=this.buildAttributesMap(u,r,a)),e&&(e=this.parseTextData(e,a,r,!0,h,!0,!0)),r=r.substr(0,r.lastIndexOf(".")),i.add(this.options.textNodeName,e),this.addChild(n,i,r,f)}else{if(u.length>0&&u.lastIndexOf("/")===u.length-1){"/"===a[a.length-1]?(a=a.substr(0,a.length-1),r=r.substr(0,r.length-1),u=a):u=u.substr(0,u.length-1),this.options.transformTagName&&(a=this.options.transformTagName(a));const t=new y(a);a!==u&&h&&(t[":@"]=this.buildAttributesMap(u,r,a)),this.addChild(n,t,r,f),r=r.substr(0,r.lastIndexOf("."))}else{const t=new y(a);this.tagsNodeStack.push(n),a!==u&&h&&(t[":@"]=this.buildAttributesMap(u,r,a)),this.addChild(n,t,r,f),n=t}i="",o=d}}else i+=t[o];return e.child};function U(t,e,n,i){this.options.captureMetaData||(i=void 0);const r=this.options.updateTag(e.tagname,n,e[":@"]);!1===r||("string"==typeof r?(e.tagname=r,t.addChild(e,i)):t.addChild(e,i))}const B=function(t){if(this.options.processEntities){for(let e in this.docTypeEntities){const n=this.docTypeEntities[e];t=t.replace(n.regx,n.val)}for(let e in this.lastEntities){const n=this.lastEntities[e];t=t.replace(n.regex,n.val)}if(this.options.htmlEntities)for(let e in this.htmlEntities){const n=this.htmlEntities[e];t=t.replace(n.regex,n.val)}t=t.replace(this.ampEntity.regex,this.ampEntity.val)}return t};function R(t,e,n,i){return t&&(void 0===i&&(i=0===e.child.length),void 0!==(t=this.parseTextData(t,e.tagname,n,!1,!!e[":@"]&&0!==Object.keys(e[":@"]).length,i))&&""!==t&&e.add(this.options.textNodeName,t),t=""),t}function Y(t,e,n){const i="*."+n;for(const n in t){const r=t[n];if(i===r||e===r)return!0}return!1}function G(t,e,n,i){const r=t.indexOf(e,n);if(-1===r)throw new Error(i);return r+e.length-1}function X(t,e,n,i=">"){const r=function(t,e,n=">"){let i,r="";for(let s=e;s<t.length;s++){let e=t[s];if(i)e===i&&(i="");else if('"'===e||"'"===e)i=e;else if(e===n[0]){if(!n[1])return{data:r,index:s};if(t[s+1]===n[1])return{data:r,index:s}}else"\t"===e&&(e=" ");r+=e}}(t,e+1,i);if(!r)return;let s=r.data;const o=r.index,a=s.search(/\s/);let l=s,u=!0;-1!==a&&(l=s.substring(0,a),s=s.substring(a+1).trimStart());const h=l;if(n){const t=l.indexOf(":");-1!==t&&(l=l.substr(t+1),u=l!==r.data.substr(t+1))}return{tagName:l,tagExp:s,closeIndex:o,attrExpPresent:u,rawTagName:h}}function q(t,e,n){const i=n;let r=1;for(;n<t.length;n++)if("<"===t[n])if("/"===t[n+1]){const s=G(t,">",n,`${e} is not closed`);if(t.substring(n+2,s).trim()===e&&(r--,0===r))return{tagContent:t.substring(i,n),i:s};n=s}else if("?"===t[n+1])n=G(t,"?>",n+1,"StopNode is not closed.");else if("!--"===t.substr(n+1,3))n=G(t,"--\x3e",n+3,"StopNode is not closed.");else if("!["===t.substr(n+1,2))n=G(t,"]]>",n,"StopNode is not closed.")-2;else{const i=X(t,n,">");i&&((i&&i.tagName)===e&&"/"!==i.tagExp[i.tagExp.length-1]&&r++,n=i.closeIndex)}}function Z(t,e,n){if(e&&"string"==typeof t){const e=t.trim();return"true"===e||"false"!==e&&function(t,e={}){if(e=Object.assign({},C,e),!t||"string"!=typeof t)return t;let n=t.trim();if(void 0!==e.skipLike&&e.skipLike.test(n))return t;if("0"===t)return 0;if(e.hex&&A.test(n))return function(t){if(parseInt)return parseInt(t,16);if(Number.parseInt)return Number.parseInt(t,16);if(window&&window.parseInt)return window.parseInt(t,16);throw new Error("parseInt, Number.parseInt, window.parseInt are not supported")}(n);if(-1!==n.search(/.+[eE].+/))return function(t,e,n){if(!n.eNotation)return t;const i=e.match(V);if(i){let r=i[1]||"";const s=-1===i[3].indexOf("e")?"E":"e",o=i[2],a=r?t[o.length+1]===s:t[o.length]===s;return o.length>1&&a?t:1!==o.length||!i[3].startsWith(`.${s}`)&&i[3][0]!==s?n.leadingZeros&&!a?(e=(i[1]||"")+i[3],Number(e)):t:Number(e)}return t}(t,n,e);{const r=S.exec(n);if(r){const s=r[1]||"",o=r[2];let a=(i=r[3])&&-1!==i.indexOf(".")?("."===(i=i.replace(/0+$/,""))?i="0":"."===i[0]?i="0"+i:"."===i[i.length-1]&&(i=i.substring(0,i.length-1)),i):i;const l=s?"."===t[o.length+1]:"."===t[o.length];if(!e.leadingZeros&&(o.length>1||1===o.length&&!l))return t;{const i=Number(n),r=String(i);if(0===i||-0===i)return i;if(-1!==r.search(/[eE]/))return e.eNotation?i:t;if(-1!==n.indexOf("."))return"0"===r||r===a||r===`${s}${a}`?i:t;let l=o?a:n;return o?l===r||s+l===r?i:t:l===r||l===s+r?i:t}}return t}// removed by dead control flow
|
|
93031
|
+
var i; }(t,n)}return void 0!==t?t:""}const W=y.getMetaDataSymbol();function K(t,e){return Q(t,e)}function Q(t,e,n){let i;const r={};for(let s=0;s<t.length;s++){const o=t[s],a=z(o);let l="";if(l=void 0===n?a:n+"."+a,a===e.textNodeName)void 0===i?i=o[a]:i+=""+o[a];else{if(void 0===a)continue;if(o[a]){let t=Q(o[a],e,l);const n=H(t,e);void 0!==o[W]&&(t[W]=o[W]),o[":@"]?J(t,o[":@"],l,e):1!==Object.keys(t).length||void 0===t[e.textNodeName]||e.alwaysCreateTextNode?0===Object.keys(t).length&&(e.alwaysCreateTextNode?t[e.textNodeName]="":t=""):t=t[e.textNodeName],void 0!==r[a]&&r.hasOwnProperty(a)?(Array.isArray(r[a])||(r[a]=[r[a]]),r[a].push(t)):e.isArray(a,l,n)?r[a]=[t]:r[a]=t}}}return"string"==typeof i?i.length>0&&(r[e.textNodeName]=i):void 0!==i&&(r[e.textNodeName]=i),r}function z(t){const e=Object.keys(t);for(let t=0;t<e.length;t++){const n=e[t];if(":@"!==n)return n}}function J(t,e,n,i){if(e){const r=Object.keys(e),s=r.length;for(let o=0;o<s;o++){const s=r[o];i.isArray(s,n+"."+s,!0,!0)?t[s]=[e[s]]:t[s]=e[s]}}}function H(t,e){const{textNodeName:n}=e,i=Object.keys(t).length;return 0===i||!(1!==i||!t[n]&&"boolean"!=typeof t[n]&&0!==t[n])}class tt{constructor(t){this.externalEntities={},this.options=function(t){return Object.assign({},v,t)}(t)}parse(t,e){if("string"!=typeof t&&t.toString)t=t.toString();else if("string"!=typeof t)throw new Error("XML data is accepted in String or Bytes[] form.");if(e){!0===e&&(e={});const n=a(t,e);if(!0!==n)throw Error(`${n.err.msg}:${n.err.line}:${n.err.col}`)}const n=new D(this.options);n.addExternalEntities(this.externalEntities);const i=n.parseXml(t);return this.options.preserveOrder||void 0===i?i:K(i,this.options)}addEntity(t,e){if(-1!==e.indexOf("&"))throw new Error("Entity value can't have '&'");if(-1!==t.indexOf("&")||-1!==t.indexOf(";"))throw new Error("An entity must be set without '&' and ';'. Eg. use '#xD' for '
'");if("&"===e)throw new Error("An entity with value '&' is not permitted");this.externalEntities[t]=e}static getMetaDataSymbol(){return y.getMetaDataSymbol()}}function et(t,e){let n="";return e.format&&e.indentBy.length>0&&(n="\n"),nt(t,e,"",n)}function nt(t,e,n,i){let r="",s=!1;for(let o=0;o<t.length;o++){const a=t[o],l=it(a);if(void 0===l)continue;let u="";if(u=0===n.length?l:`${n}.${l}`,l===e.textNodeName){let t=a[l];st(u,e)||(t=e.tagValueProcessor(l,t),t=ot(t,e)),s&&(r+=i),r+=t,s=!1;continue}if(l===e.cdataPropName){s&&(r+=i),r+=`<![CDATA[${a[l][0][e.textNodeName]}]]>`,s=!1;continue}if(l===e.commentPropName){r+=i+`\x3c!--${a[l][0][e.textNodeName]}--\x3e`,s=!0;continue}if("?"===l[0]){const t=rt(a[":@"],e),n="?xml"===l?"":i;let o=a[l][0][e.textNodeName];o=0!==o.length?" "+o:"",r+=n+`<${l}${o}${t}?>`,s=!0;continue}let h=i;""!==h&&(h+=e.indentBy);const d=i+`<${l}${rt(a[":@"],e)}`,p=nt(a[l],e,u,h);-1!==e.unpairedTags.indexOf(l)?e.suppressUnpairedNode?r+=d+">":r+=d+"/>":p&&0!==p.length||!e.suppressEmptyNode?p&&p.endsWith(">")?r+=d+`>${p}${i}</${l}>`:(r+=d+">",p&&""!==i&&(p.includes("/>")||p.includes("</"))?r+=i+e.indentBy+p+i:r+=p,r+=`</${l}>`):r+=d+"/>",s=!0}return r}function it(t){const e=Object.keys(t);for(let n=0;n<e.length;n++){const i=e[n];if(t.hasOwnProperty(i)&&":@"!==i)return i}}function rt(t,e){let n="";if(t&&!e.ignoreAttributes)for(let i in t){if(!t.hasOwnProperty(i))continue;let r=e.attributeValueProcessor(i,t[i]);r=ot(r,e),!0===r&&e.suppressBooleanAttributes?n+=` ${i.substr(e.attributeNamePrefix.length)}`:n+=` ${i.substr(e.attributeNamePrefix.length)}="${r}"`}return n}function st(t,e){let n=(t=t.substr(0,t.length-e.textNodeName.length-1)).substr(t.lastIndexOf(".")+1);for(let i in e.stopNodes)if(e.stopNodes[i]===t||e.stopNodes[i]==="*."+n)return!0;return!1}function ot(t,e){if(t&&t.length>0&&e.processEntities)for(let n=0;n<e.entities.length;n++){const i=e.entities[n];t=t.replace(i.regex,i.val)}return t}const at={attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,cdataPropName:!1,format:!1,indentBy:" ",suppressEmptyNode:!1,suppressUnpairedNode:!0,suppressBooleanAttributes:!0,tagValueProcessor:function(t,e){return e},attributeValueProcessor:function(t,e){return e},preserveOrder:!1,commentPropName:!1,unpairedTags:[],entities:[{regex:new RegExp("&","g"),val:"&"},{regex:new RegExp(">","g"),val:">"},{regex:new RegExp("<","g"),val:"<"},{regex:new RegExp("'","g"),val:"'"},{regex:new RegExp('"',"g"),val:"""}],processEntities:!0,stopNodes:[],oneListGroup:!1};function lt(t){this.options=Object.assign({},at,t),!0===this.options.ignoreAttributes||this.options.attributesGroupName?this.isAttribute=function(){return!1}:(this.ignoreAttributesFn=$(this.options.ignoreAttributes),this.attrPrefixLen=this.options.attributeNamePrefix.length,this.isAttribute=dt),this.processTextOrObjNode=ut,this.options.format?(this.indentate=ht,this.tagEndChar=">\n",this.newLine="\n"):(this.indentate=function(){return""},this.tagEndChar=">",this.newLine="")}function ut(t,e,n,i){const r=this.j2x(t,n+1,i.concat(e));return void 0!==t[this.options.textNodeName]&&1===Object.keys(t).length?this.buildTextValNode(t[this.options.textNodeName],e,r.attrStr,n):this.buildObjectNode(r.val,e,r.attrStr,n)}function ht(t){return this.options.indentBy.repeat(t)}function dt(t){return!(!t.startsWith(this.options.attributeNamePrefix)||t===this.options.textNodeName)&&t.substr(this.attrPrefixLen)}lt.prototype.build=function(t){return this.options.preserveOrder?et(t,this.options):(Array.isArray(t)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1&&(t={[this.options.arrayNodeName]:t}),this.j2x(t,0,[]).val)},lt.prototype.j2x=function(t,e,n){let i="",r="";const s=n.join(".");for(let o in t)if(Object.prototype.hasOwnProperty.call(t,o))if(void 0===t[o])this.isAttribute(o)&&(r+="");else if(null===t[o])this.isAttribute(o)||o===this.options.cdataPropName?r+="":"?"===o[0]?r+=this.indentate(e)+"<"+o+"?"+this.tagEndChar:r+=this.indentate(e)+"<"+o+"/"+this.tagEndChar;else if(t[o]instanceof Date)r+=this.buildTextValNode(t[o],o,"",e);else if("object"!=typeof t[o]){const n=this.isAttribute(o);if(n&&!this.ignoreAttributesFn(n,s))i+=this.buildAttrPairStr(n,""+t[o]);else if(!n)if(o===this.options.textNodeName){let e=this.options.tagValueProcessor(o,""+t[o]);r+=this.replaceEntitiesValue(e)}else r+=this.buildTextValNode(t[o],o,"",e)}else if(Array.isArray(t[o])){const i=t[o].length;let s="",a="";for(let l=0;l<i;l++){const i=t[o][l];if(void 0===i);else if(null===i)"?"===o[0]?r+=this.indentate(e)+"<"+o+"?"+this.tagEndChar:r+=this.indentate(e)+"<"+o+"/"+this.tagEndChar;else if("object"==typeof i)if(this.options.oneListGroup){const t=this.j2x(i,e+1,n.concat(o));s+=t.val,this.options.attributesGroupName&&i.hasOwnProperty(this.options.attributesGroupName)&&(a+=t.attrStr)}else s+=this.processTextOrObjNode(i,o,e,n);else if(this.options.oneListGroup){let t=this.options.tagValueProcessor(o,i);t=this.replaceEntitiesValue(t),s+=t}else s+=this.buildTextValNode(i,o,"",e)}this.options.oneListGroup&&(s=this.buildObjectNode(s,o,a,e)),r+=s}else if(this.options.attributesGroupName&&o===this.options.attributesGroupName){const e=Object.keys(t[o]),n=e.length;for(let r=0;r<n;r++)i+=this.buildAttrPairStr(e[r],""+t[o][e[r]])}else r+=this.processTextOrObjNode(t[o],o,e,n);return{attrStr:i,val:r}},lt.prototype.buildAttrPairStr=function(t,e){return e=this.options.attributeValueProcessor(t,""+e),e=this.replaceEntitiesValue(e),this.options.suppressBooleanAttributes&&"true"===e?" "+t:" "+t+'="'+e+'"'},lt.prototype.buildObjectNode=function(t,e,n,i){if(""===t)return"?"===e[0]?this.indentate(i)+"<"+e+n+"?"+this.tagEndChar:this.indentate(i)+"<"+e+n+this.closeTag(e)+this.tagEndChar;{let r="</"+e+this.tagEndChar,s="";return"?"===e[0]&&(s="?",r=""),!n&&""!==n||-1!==t.indexOf("<")?!1!==this.options.commentPropName&&e===this.options.commentPropName&&0===s.length?this.indentate(i)+`\x3c!--${t}--\x3e`+this.newLine:this.indentate(i)+"<"+e+n+s+this.tagEndChar+t+this.indentate(i)+r:this.indentate(i)+"<"+e+n+s+">"+t+r}},lt.prototype.closeTag=function(t){let e="";return-1!==this.options.unpairedTags.indexOf(t)?this.options.suppressUnpairedNode||(e="/"):e=this.options.suppressEmptyNode?"/":`></${t}`,e},lt.prototype.buildTextValNode=function(t,e,n,i){if(!1!==this.options.cdataPropName&&e===this.options.cdataPropName)return this.indentate(i)+`<![CDATA[${t}]]>`+this.newLine;if(!1!==this.options.commentPropName&&e===this.options.commentPropName)return this.indentate(i)+`\x3c!--${t}--\x3e`+this.newLine;if("?"===e[0])return this.indentate(i)+"<"+e+n+"?"+this.tagEndChar;{let r=this.options.tagValueProcessor(e,t);return r=this.replaceEntitiesValue(r),""===r?this.indentate(i)+"<"+e+n+this.closeTag(e)+this.tagEndChar:this.indentate(i)+"<"+e+n+">"+r+"</"+e+this.tagEndChar}},lt.prototype.replaceEntitiesValue=function(t){if(t&&t.length>0&&this.options.processEntities)for(let e=0;e<this.options.entities.length;e++){const n=this.options.entities[e];t=t.replace(n.regex,n.val)}return t};const pt={validate:a};module.exports=e})();
|
|
92823
93032
|
|
|
92824
93033
|
/***/ }),
|
|
92825
93034
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abaplint/transpiler-cli",
|
|
3
|
-
"version": "2.12.
|
|
3
|
+
"version": "2.12.4",
|
|
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.12.
|
|
30
|
+
"@abaplint/core": "^2.113.232",
|
|
31
|
+
"@abaplint/transpiler": "^2.12.4",
|
|
32
32
|
"@types/glob": "^8.1.0",
|
|
33
|
-
"@types/node": "^24.
|
|
33
|
+
"@types/node": "^24.8.1",
|
|
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.9.3",
|
|
39
39
|
"p-limit": "^3.1.0",
|
|
40
40
|
"webpack-cli": "^6.0.1",
|
|
41
|
-
"webpack": "^5.102.
|
|
41
|
+
"webpack": "^5.102.1"
|
|
42
42
|
}
|
|
43
43
|
}
|