@abaplint/transpiler-cli 2.12.3 → 2.12.5

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 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 ret = (0, combi_1.seq)((0, combi_1.altPrio)(component_chain_simple_1.ComponentChainSimple, _1.Dynamic), "=", _1.Source);
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%$\*\/\?]+$/), (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)));
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 new _1.Field();
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 field = (0, combi_1.altPrio)(_1.SQLAggregation, _1.SQLCase, sql_function_1.SQLFunction, sql_path_1.SQLPath, _1.SQLFieldName, abap, _1.Constant);
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)), paren);
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", "BADI", expressions_1.MethodSource, expressions_1.MethodCallBody);
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 ret = (0, combi_1.seq)("FIELD", expressions_1.FieldChain, (0, combi_1.opt)((0, combi_1.altPrio)(module, values, wit)));
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);
@@ -13927,8 +13961,8 @@ class Loop {
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)("AT", (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));
13931
- return (0, combi_1.seq)("LOOP", (0, combi_1.opt)(at));
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 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", (0, combi_1.alt)(expressions_1.InlineField, expressions_1.TextElement))), (0, combi_1.optPrio)("NO INTERVALS"));
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", (0, combi_1.alt)(expressions_1.InlineField, expressions_1.TextElement)), "NO INTERVALS", nesting);
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)((0, combi_1.alt)(expressions_1.InlineField, expressions_1.TextElement)), (0, combi_1.opt)(commentOpt));
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, (0, combi_1.alt)(expressions_1.InlineField, expressions_1.TextElement), command, (0, combi_1.opt)(modif), (0, combi_1.opt)(visible));
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), (0, combi_1.alt)(expressions_1.InlineField, expressions_1.TextElement), command, (0, combi_1.opt)(def), (0, combi_1.opt)(modif));
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
- const target = (0, combi_1.altPrio)(text, normal);
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.FieldSub, expressions_1.SourceFieldSymbol, expressions_1.Dynamic);
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.FieldChain);
23474
+ sub = node.findFirstExpression(Expressions.TypeName);
23390
23475
  }
23391
23476
  if (sub === undefined) {
23392
- sub = node.findFirstExpression(Expressions.TypeName);
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 && !(found instanceof Types.UnknownType) && !(found instanceof Types.VoidType)) {
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, _c;
25207
- const nameToken = (_a = node.findFirstExpression(expressions_1.FormParamName)) === null || _a === void 0 ? void 0 : _a.getFirstToken();
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 = (_b = node.findDirectExpression(expressions_1.SimpleFieldChain)) === null || _b === void 0 ? void 0 : _b.getFirstToken().getStr();
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 = (_c = input.scope.findType(typeName)) === null || _c === void 0 ? void 0 : _c.getType();
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
- const fieldname = (_a = s.findDirectExpression(Expressions.FieldSub)) === null || _a === void 0 ? void 0 : _a.concatTokens().toUpperCase();
28285
- if (fieldname) {
28286
- if (fields.has(fieldname)) {
28287
- const message = "Duplicate field assignment";
28288
- input.issues.push((0, _syntax_input_1.syntaxIssue)(input, s.getFirstToken(), message));
28289
- return basic_1.VoidType.get(_syntax_input_1.CheckSyntaxKey);
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: new basic_1.CharacterType(1) }, // todo
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
- const as = (_b = node.findExpressionAfterToken("AS")) === null || _b === void 0 ? void 0 : _b.concatTokens();
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
- else if (ityp instanceof basic_1.VoidType) {
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 = (_c = node.findExpressionAfterToken("SUFFIX")) === null || _c === void 0 ? void 0 : _c.concatTokens();
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 magic")));
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).parseType(typeExpression);
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.findDirectExpressions(Expressions.Source);
32696
- let firstSource = node.findDirectExpression(Expressions.SimpleSource2);
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.getFirstToken().getStr().length > 8) {
33033
- const message = "SELECTION-SCREEN name too long, " + field.getFirstToken().getStr();
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
- input.scope.addIdentifier(new _typed_identifier_1.TypedIdentifier(fieldName, input.filename, new basic_1.CharacterType(83), ["selection_screen_tab" /* IdentifierMeta.SelectionScreenTab */]));
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
- input.scope.addIdentifier(new _typed_identifier_1.TypedIdentifier(fieldName, input.filename, new basic_1.CharacterType(83)));
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()) {
@@ -53459,7 +53637,7 @@ class Registry {
53459
53637
  }
53460
53638
  static abaplintVersion() {
53461
53639
  // magic, see build script "version.sh"
53462
- return "2.113.223";
53640
+ return "2.113.232";
53463
53641
  }
53464
53642
  getDDICReferences() {
53465
53643
  return this.ddicReferences;
@@ -55438,6 +55616,10 @@ DATA END OF foo.`,
55438
55616
  if (t.getChildren().length !== 3) {
55439
55617
  continue;
55440
55618
  }
55619
+ const data = t.findFirstStatement(Statements.DataBegin);
55620
+ if (data === null || data === void 0 ? void 0 : data.findDirectTokenByText("OCCURS")) {
55621
+ continue;
55622
+ }
55441
55623
  if (t.findFirstStatement(Statements.IncludeType)) {
55442
55624
  const token = t.getFirstToken();
55443
55625
  const message = "DATA BEGIN with single INCLUDE";
@@ -56362,6 +56544,7 @@ const _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ "./
56362
56544
  const _abap_object_1 = __webpack_require__(/*! ../objects/_abap_object */ "./node_modules/@abaplint/core/build/src/objects/_abap_object.js");
56363
56545
  const include_graph_1 = __webpack_require__(/*! ../utils/include_graph */ "./node_modules/@abaplint/core/build/src/utils/include_graph.js");
56364
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");
56365
56548
  class CheckIncludeConf extends _basic_rule_config_1.BasicRuleConfig {
56366
56549
  }
56367
56550
  exports.CheckIncludeConf = CheckIncludeConf;
@@ -56377,7 +56560,8 @@ class CheckInclude {
56377
56560
  extendedInformation: `
56378
56561
  * Reports unused includes
56379
56562
  * Errors if the includes are not found
56380
- * Error if including a main program`,
56563
+ * Error if including a main program
56564
+ * Skips ZX* includes`,
56381
56565
  tags: [_irule_1.RuleTag.Syntax],
56382
56566
  };
56383
56567
  }
@@ -56396,6 +56580,9 @@ class CheckInclude {
56396
56580
  if (!(obj instanceof _abap_object_1.ABAPObject)) {
56397
56581
  return [];
56398
56582
  }
56583
+ if (obj instanceof objects_1.Program && obj.isInclude() === true && obj.getName().startsWith("ZX")) {
56584
+ return [];
56585
+ }
56399
56586
  let ret = [];
56400
56587
  for (const file of obj.getABAPFiles()) {
56401
56588
  ret = ret.concat(this.graph.getIssuesFile(file));
@@ -68964,6 +69151,12 @@ class ObsoleteStatementConf extends _basic_rule_config_1.BasicRuleConfig {
68964
69151
  this.formDefinition = true;
68965
69152
  /** Check for FORM IMPLEMENTATION */
68966
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;
68967
69160
  }
68968
69161
  }
68969
69162
  exports.ObsoleteStatementConf = ObsoleteStatementConf;
@@ -69075,10 +69268,22 @@ ENDIF.`,
69075
69268
  const issue = issue_1.Issue.atStatement(file, staNode, "COMMUNICATION is obsolete", this.getMetadata().key, this.conf.severity);
69076
69269
  issues.push(issue);
69077
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
+ }
69078
69279
  if (this.conf.pack && sta instanceof Statements.Pack) {
69079
69280
  const issue = issue_1.Issue.atStatement(file, staNode, "PACK is obsolete", this.getMetadata().key, this.conf.severity);
69080
69281
  issues.push(issue);
69081
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
+ }
69082
69287
  if (this.conf.parameter && sta instanceof Statements.Parameter) {
69083
69288
  const token = staNode.getFirstToken();
69084
69289
  if (token.getStr().toUpperCase() === "PARAMETER") {
@@ -76740,11 +76945,7 @@ class SkipLogic {
76740
76945
  var _a;
76741
76946
  if (this.tobj === undefined) {
76742
76947
  this.tobj = {};
76743
- for (const obj of this.reg.getObjects()) {
76744
- if (obj.getType() !== "TOBJ") {
76745
- continue;
76746
- }
76747
- const tobj = obj;
76948
+ for (const tobj of this.reg.getObjectsByType("TOBJ")) {
76748
76949
  const area = (_a = tobj.getArea()) === null || _a === void 0 ? void 0 : _a.toUpperCase();
76749
76950
  if (area) {
76750
76951
  this.tobj[area] = true;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/transpiler-cli",
3
- "version": "2.12.3",
3
+ "version": "2.12.5",
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.223",
31
- "@abaplint/transpiler": "^2.12.3",
30
+ "@abaplint/core": "^2.113.232",
31
+ "@abaplint/transpiler": "^2.12.5",
32
32
  "@types/glob": "^8.1.0",
33
- "@types/node": "^24.7.0",
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.0"
41
+ "webpack": "^5.102.1"
42
42
  }
43
43
  }