@abaplint/transpiler-cli 2.10.20 → 2.10.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/build/bundle.js CHANGED
@@ -3293,7 +3293,7 @@ class Compare extends combi_1.Expression {
3293
3293
  const between = (0, combi_1.seq)((0, combi_1.optPrio)("NOT"), "BETWEEN", _1.Source, "AND", _1.Source);
3294
3294
  const predicate = (0, combi_1.ver)(version_1.Version.v740sp08, _1.MethodCallChain);
3295
3295
  const rett = (0, combi_1.seq)(_1.Source, (0, combi_1.altPrio)((0, combi_1.seq)(_1.CompareOperator, _1.Source), inn, between, sopt));
3296
- const fsassign = (0, combi_1.seq)(_1.SourceFieldSymbol, "IS", (0, combi_1.optPrio)("NOT"), "ASSIGNED");
3296
+ const fsassign = (0, combi_1.seq)(_1.SourceFieldSymbolChain, "IS", (0, combi_1.optPrio)("NOT"), "ASSIGNED");
3297
3297
  const ret = (0, combi_1.seq)((0, combi_1.opt)("NOT"), (0, combi_1.altPrio)(rett, predicate, fsassign));
3298
3298
  return ret;
3299
3299
  }
@@ -3733,7 +3733,7 @@ class CorrespondingBody extends combi_1.Expression {
3733
3733
  const mapping = (0, combi_1.seq)("MAPPING", (0, combi_1.plus)((0, combi_1.seq)(_1.ComponentName, "=", component_chain_1.ComponentChain)));
3734
3734
  const baseParen = (0, combi_1.seq)("BASE", (0, combi_1.tok)(tokens_1.WParenLeftW), _1.Source, (0, combi_1.tok)(tokens_1.WParenRightW));
3735
3735
  const discarding = (0, combi_1.ver)(version_1.Version.v751, "DISCARDING DUPLICATES");
3736
- return (0, combi_1.seq)((0, combi_1.optPrio)("DEEP"), (0, combi_1.optPrio)(baseParen), _1.Source, (0, combi_1.optPrio)(discarding), (0, combi_1.optPrio)(mapping), (0, combi_1.optPrio)((0, combi_1.seq)("EXCEPT", (0, combi_1.alt)((0, combi_1.plus)(_1.Field), "*"))));
3736
+ return (0, combi_1.seq)((0, combi_1.optPrio)("DEEP"), (0, combi_1.optPrio)(baseParen), _1.Source, (0, combi_1.optPrio)(discarding), (0, combi_1.optPrio)(mapping), (0, combi_1.optPrio)("CHANGING CONTROL"), (0, combi_1.optPrio)((0, combi_1.seq)("EXCEPT", (0, combi_1.alt)((0, combi_1.plus)(_1.Field), "*"))));
3737
3737
  }
3738
3738
  }
3739
3739
  exports.CorrespondingBody = CorrespondingBody;
@@ -3871,7 +3871,7 @@ const combi_1 = __webpack_require__(/*! ../combi */ "./node_modules/@abaplint/co
3871
3871
  const tokens_1 = __webpack_require__(/*! ../../1_lexer/tokens */ "./node_modules/@abaplint/core/build/src/abap/1_lexer/tokens/index.js");
3872
3872
  class DefinitionName extends combi_1.Expression {
3873
3873
  getRunnable() {
3874
- const r = (0, combi_1.regex)(/^((\w*\/\w+\/)|(\w*\/\w+\/)?[\w\*$%]+)$/);
3874
+ const r = (0, combi_1.regex)(/^&|&?((\w*\/\w+\/)|(\w*\/\w+\/)?[\w\*$%\?]+)$/);
3875
3875
  return (0, combi_1.seq)(r, (0, combi_1.starPrio)((0, combi_1.seq)((0, combi_1.tok)(tokens_1.Dash), (0, combi_1.optPrio)(r))), (0, combi_1.optPrio)((0, combi_1.tok)(tokens_1.DashW)));
3876
3876
  }
3877
3877
  }
@@ -3961,7 +3961,7 @@ exports.EntityAssociation = void 0;
3961
3961
  const combi_1 = __webpack_require__(/*! ../combi */ "./node_modules/@abaplint/core/build/src/abap/2_statements/combi.js");
3962
3962
  class EntityAssociation extends combi_1.Expression {
3963
3963
  getRunnable() {
3964
- return (0, combi_1.regex)(/^[\w]+\\_[\w]+$/);
3964
+ return (0, combi_1.regex)(/^[\/\w]+(\\_|\\\\)[\_\w\\~]+$/);
3965
3965
  }
3966
3966
  }
3967
3967
  exports.EntityAssociation = EntityAssociation;
@@ -4052,7 +4052,7 @@ class Field extends combi_1.Expression {
4052
4052
  getRunnable() {
4053
4053
  // "&1" can be used for almost anything(field names, method names etc.) in macros
4054
4054
  // field names with only digits should not be possible
4055
- return (0, combi_1.regex)(/^[&_!]?\*?\w*(\/\w+\/)?\d*[a-zA-Z_%\$][\w\*%\$\?#]*(~\w+)?$/);
4055
+ return (0, combi_1.regex)(/^[&_!?]?\*?\w*(\/\w+\/)?\d*[a-zA-Z_%\$][\w\*%\$\?#]*(~\w+)?$/);
4056
4056
  }
4057
4057
  }
4058
4058
  exports.Field = Field;
@@ -4177,7 +4177,7 @@ const tokens_1 = __webpack_require__(/*! ../../1_lexer/tokens */ "./node_modules
4177
4177
  const _1 = __webpack_require__(/*! . */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js");
4178
4178
  class FieldOffset extends combi_1.Expression {
4179
4179
  getRunnable() {
4180
- const offset = (0, combi_1.seq)((0, combi_1.tok)(tokens_1.Plus), (0, combi_1.altPrio)((0, combi_1.regex)(/^\d+$/), _1.SimpleFieldChain2));
4180
+ const offset = (0, combi_1.seq)((0, combi_1.tok)(tokens_1.Plus), (0, combi_1.optPrio)((0, combi_1.altPrio)((0, combi_1.regex)(/^\d+$/), _1.SimpleFieldChain2)));
4181
4181
  return offset;
4182
4182
  }
4183
4183
  }
@@ -4201,7 +4201,7 @@ const tokens_1 = __webpack_require__(/*! ../../1_lexer/tokens */ "./node_modules
4201
4201
  const table_body_1 = __webpack_require__(/*! ./table_body */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/table_body.js");
4202
4202
  class FieldSub extends combi_1.Expression {
4203
4203
  getRunnable() {
4204
- const ret = (0, combi_1.seq)((0, combi_1.regex)(/^\*?!?(\/\w+\/)?[a-zA-Z_%$][\w%$\$\*]*$/), (0, combi_1.starPrio)((0, combi_1.seq)((0, combi_1.tok)(tokens_1.Dash), (0, combi_1.regex)(/^[\w%$\$\*]+$/))), (0, combi_1.opt)(table_body_1.TableBody));
4204
+ const ret = (0, combi_1.seq)((0, combi_1.regex)(/^\*?!?&?(\/\w+\/)?[a-zA-Z_%$\?][\w%$\$\*]*$/), (0, combi_1.starPrio)((0, combi_1.seq)((0, combi_1.tok)(tokens_1.Dash), (0, combi_1.regex)(/^[\w%$\$\*]+$/))), (0, combi_1.opt)(table_body_1.TableBody));
4205
4205
  return ret;
4206
4206
  }
4207
4207
  }
@@ -4374,7 +4374,7 @@ const tokens_1 = __webpack_require__(/*! ../../1_lexer/tokens */ "./node_modules
4374
4374
  class FormName extends combi_1.Expression {
4375
4375
  getRunnable() {
4376
4376
  // todo, does not handle namespaces properly
4377
- 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)));
4377
+ 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)));
4378
4378
  }
4379
4379
  }
4380
4380
  exports.FormName = FormName;
@@ -4663,7 +4663,7 @@ const combi_1 = __webpack_require__(/*! ../combi */ "./node_modules/@abaplint/co
4663
4663
  const tokens_1 = __webpack_require__(/*! ../../1_lexer/tokens */ "./node_modules/@abaplint/core/build/src/abap/1_lexer/tokens/index.js");
4664
4664
  class IncludeName extends combi_1.Expression {
4665
4665
  getRunnable() {
4666
- return (0, combi_1.seq)((0, combi_1.regex)(/^<?(\/\w+\/)?[\w%]+(~\w+)?>?$/), (0, combi_1.optPrio)((0, combi_1.seq)((0, combi_1.tok)(tokens_1.Dash), (0, combi_1.regex)(/^\w+$/))));
4666
+ return (0, combi_1.seq)((0, combi_1.regex)(/^<?(\/\w+\/)?[\w%#]+(~\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+$/)))));
4667
4667
  }
4668
4668
  }
4669
4669
  exports.IncludeName = IncludeName;
@@ -4844,6 +4844,7 @@ __exportStar(__webpack_require__(/*! ./simple_source2 */ "./node_modules/@abapli
4844
4844
  __exportStar(__webpack_require__(/*! ./simple_source3 */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/simple_source3.js"), exports);
4845
4845
  __exportStar(__webpack_require__(/*! ./simple_source4 */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/simple_source4.js"), exports);
4846
4846
  __exportStar(__webpack_require__(/*! ./simple_target */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/simple_target.js"), exports);
4847
+ __exportStar(__webpack_require__(/*! ./source_field_symbol_chain */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/source_field_symbol_chain.js"), exports);
4847
4848
  __exportStar(__webpack_require__(/*! ./source_field_symbol */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/source_field_symbol.js"), exports);
4848
4849
  __exportStar(__webpack_require__(/*! ./source_field */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/source_field.js"), exports);
4849
4850
  __exportStar(__webpack_require__(/*! ./source */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/source.js"), exports);
@@ -4863,10 +4864,13 @@ __exportStar(__webpack_require__(/*! ./sql_field_list_loop */ "./node_modules/@a
4863
4864
  __exportStar(__webpack_require__(/*! ./sql_field_list */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_field_list.js"), exports);
4864
4865
  __exportStar(__webpack_require__(/*! ./sql_field_name */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_field_name.js"), exports);
4865
4866
  __exportStar(__webpack_require__(/*! ./sql_field */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_field.js"), exports);
4867
+ __exportStar(__webpack_require__(/*! ./sql_fields_loop */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_fields_loop.js"), exports);
4866
4868
  __exportStar(__webpack_require__(/*! ./sql_fields */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_fields.js"), exports);
4867
4869
  __exportStar(__webpack_require__(/*! ./sql_for_all_entries */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_for_all_entries.js"), exports);
4868
4870
  __exportStar(__webpack_require__(/*! ./sql_from_source */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_from_source.js"), exports);
4869
4871
  __exportStar(__webpack_require__(/*! ./sql_from */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_from.js"), exports);
4872
+ __exportStar(__webpack_require__(/*! ./provide_field_name */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/provide_field_name.js"), exports);
4873
+ __exportStar(__webpack_require__(/*! ./sql_function_input */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_function_input.js"), exports);
4870
4874
  __exportStar(__webpack_require__(/*! ./sql_function */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_function.js"), exports);
4871
4875
  __exportStar(__webpack_require__(/*! ./sql_group_by */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_group_by.js"), exports);
4872
4876
  __exportStar(__webpack_require__(/*! ./sql_having */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_having.js"), exports);
@@ -4975,7 +4979,8 @@ const _1 = __webpack_require__(/*! . */ "./node_modules/@abaplint/core/build/src
4975
4979
  class InlineLoopDefinition extends combi_1.Expression {
4976
4980
  getRunnable() {
4977
4981
  const index = (0, combi_1.seq)("INDEX INTO", _1.TargetField);
4978
- return (0, combi_1.seq)((0, combi_1.altPrio)(_1.TargetFieldSymbol, _1.TargetField), "IN", (0, combi_1.opt)("GROUP"), _1.Source, (0, combi_1.optPrio)(index));
4982
+ const key = (0, combi_1.seq)("USING KEY", _1.SimpleName);
4983
+ return (0, combi_1.seq)((0, combi_1.altPrio)(_1.TargetFieldSymbol, _1.TargetField), "IN", (0, combi_1.opt)("GROUP"), _1.Source, (0, combi_1.optPrio)(key), (0, combi_1.optPrio)(index));
4979
4984
  }
4980
4985
  }
4981
4986
  exports.InlineLoopDefinition = InlineLoopDefinition;
@@ -5329,11 +5334,12 @@ exports.MacroName = MacroName;
5329
5334
 
5330
5335
  Object.defineProperty(exports, "__esModule", ({ value: true }));
5331
5336
  exports.MessageClass = void 0;
5337
+ const tokens_1 = __webpack_require__(/*! ../../1_lexer/tokens */ "./node_modules/@abaplint/core/build/src/abap/1_lexer/tokens/index.js");
5332
5338
  const combi_1 = __webpack_require__(/*! ../combi */ "./node_modules/@abaplint/core/build/src/abap/2_statements/combi.js");
5333
5339
  class MessageClass extends combi_1.Expression {
5334
5340
  getRunnable() {
5335
5341
  // "&1" can be used for almost anything(field names, method names etc.) in macros
5336
- return (0, combi_1.regex)(/^>?[\w\/]+#?@?\/?!?&?>?\$?$/);
5342
+ return (0, combi_1.seq)((0, combi_1.regex)(/^>?[\w\/]+#?@?\/?!?&?>?\$?\??<?$/), (0, combi_1.starPrio)((0, combi_1.tok)(tokens_1.Plus)), (0, combi_1.starPrio)((0, combi_1.tok)(tokens_1.PlusW)), (0, combi_1.starPrio)((0, combi_1.seq)((0, combi_1.tok)(tokens_1.Dash), (0, combi_1.optPrio)((0, combi_1.regex)(/^\w+$/)))), (0, combi_1.optPrio)((0, combi_1.tok)(tokens_1.DashW)));
5337
5343
  }
5338
5344
  }
5339
5345
  exports.MessageClass = MessageClass;
@@ -5844,7 +5850,7 @@ exports.NamespaceSimpleName = void 0;
5844
5850
  const combi_1 = __webpack_require__(/*! ../combi */ "./node_modules/@abaplint/core/build/src/abap/2_statements/combi.js");
5845
5851
  class NamespaceSimpleName extends combi_1.Expression {
5846
5852
  getRunnable() {
5847
- return (0, combi_1.regex)(/^((\w*\/\w+\/)|(\w*\/\w+\/)?[\w\*$%]+)$/);
5853
+ return (0, combi_1.regex)(/^((\w*\/\w+\/)|(\w*\/\w+\/)?[\w\*$%#]+)$/);
5848
5854
  }
5849
5855
  }
5850
5856
  exports.NamespaceSimpleName = NamespaceSimpleName;
@@ -6174,6 +6180,28 @@ exports.PerformUsing = PerformUsing;
6174
6180
 
6175
6181
  /***/ }),
6176
6182
 
6183
+ /***/ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/provide_field_name.js":
6184
+ /*!***************************************************************************************************!*\
6185
+ !*** ./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/provide_field_name.js ***!
6186
+ \***************************************************************************************************/
6187
+ /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
6188
+
6189
+ "use strict";
6190
+
6191
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
6192
+ exports.ProvideFieldName = void 0;
6193
+ const tokens_1 = __webpack_require__(/*! ../../1_lexer/tokens */ "./node_modules/@abaplint/core/build/src/abap/1_lexer/tokens/index.js");
6194
+ const combi_1 = __webpack_require__(/*! ../combi */ "./node_modules/@abaplint/core/build/src/abap/2_statements/combi.js");
6195
+ class ProvideFieldName extends combi_1.Expression {
6196
+ getRunnable() {
6197
+ return (0, combi_1.seq)((0, combi_1.regex)(/^(?!(?:FROM|BETWEEN|WHERE)$)(\/\w+\/)?(\w+~(\w+|\*)|\w+)$/i), (0, combi_1.optPrio)((0, combi_1.seq)((0, combi_1.tok)(tokens_1.Dash), (0, combi_1.regex)(/^\w+$/i))));
6198
+ }
6199
+ }
6200
+ exports.ProvideFieldName = ProvideFieldName;
6201
+ //# sourceMappingURL=provide_field_name.js.map
6202
+
6203
+ /***/ }),
6204
+
6177
6205
  /***/ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/radio_group_name.js":
6178
6206
  /*!*************************************************************************************************!*\
6179
6207
  !*** ./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/radio_group_name.js ***!
@@ -6209,8 +6237,10 @@ const combi_1 = __webpack_require__(/*! ../combi */ "./node_modules/@abaplint/co
6209
6237
  const _1 = __webpack_require__(/*! . */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js");
6210
6238
  class RaiseWith extends combi_1.Expression {
6211
6239
  getRunnable() {
6212
- const wit = (0, combi_1.seq)("WITH", _1.SimpleSource1, (0, combi_1.opt)(_1.SimpleSource1), (0, combi_1.opt)(_1.SimpleSource1), (0, combi_1.opt)(_1.SimpleSource1));
6213
- return wit;
6240
+ const wit = (0, combi_1.seq)(_1.SimpleSource1, (0, combi_1.opt)(_1.SimpleSource1), (0, combi_1.opt)(_1.SimpleSource1), (0, combi_1.opt)(_1.SimpleSource1));
6241
+ // todo: I guess this is from version something?
6242
+ const witComplex = (0, combi_1.seq)(_1.Source, (0, combi_1.opt)(_1.Source), (0, combi_1.opt)(_1.Source), (0, combi_1.opt)(_1.Source));
6243
+ return (0, combi_1.seq)("WITH", (0, combi_1.altPrio)(witComplex, wit));
6214
6244
  }
6215
6245
  }
6216
6246
  exports.RaiseWith = RaiseWith;
@@ -6377,8 +6407,6 @@ const _1 = __webpack_require__(/*! . */ "./node_modules/@abaplint/core/build/src
6377
6407
  const version_1 = __webpack_require__(/*! ../../../version */ "./node_modules/@abaplint/core/build/src/version.js");
6378
6408
  const sql_group_by_1 = __webpack_require__(/*! ./sql_group_by */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_group_by.js");
6379
6409
  const sql_into_structure_1 = __webpack_require__(/*! ./sql_into_structure */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_into_structure.js");
6380
- const tokens_1 = __webpack_require__(/*! ../../1_lexer/tokens */ "./node_modules/@abaplint/core/build/src/abap/1_lexer/tokens/index.js");
6381
- const sql_field_name_1 = __webpack_require__(/*! ./sql_field_name */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_field_name.js");
6382
6410
  const sql_up_to_1 = __webpack_require__(/*! ./sql_up_to */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_up_to.js");
6383
6411
  class Select extends combi_1.Expression {
6384
6412
  getRunnable() {
@@ -6389,9 +6417,8 @@ class Select extends combi_1.Expression {
6389
6417
  const fields = (0, combi_1.ver)(version_1.Version.v750, _1.SQLFields);
6390
6418
  // todo, HINTS cannot be anywhere, need an expression dedicated for strict sql
6391
6419
  const perm = (0, combi_1.per)(_1.SQLFrom, into, _1.SQLForAllEntries, where, _1.SQLOrderBy, sql_up_to_1.SQLUpTo, offset, _1.SQLClient, _1.SQLHaving, bypass, sql_group_by_1.SQLGroupBy, fields, _1.DatabaseConnection, _1.SQLHints);
6392
- const permSingle = (0, combi_1.per)(_1.SQLFrom, (0, combi_1.altPrio)(sql_into_structure_1.SQLIntoStructure, _1.SQLIntoList), where, _1.SQLClient, bypass, fields, _1.DatabaseConnection, _1.SQLHints);
6393
- const paren = (0, combi_1.seq)((0, combi_1.tok)(tokens_1.WParenLeftW), sql_field_name_1.SQLFieldName, (0, combi_1.tok)(tokens_1.WParenRightW));
6394
- const fieldList = (0, combi_1.optPrio)((0, combi_1.altPrio)(_1.SQLFieldList, paren));
6420
+ const permSingle = (0, combi_1.per)(_1.SQLFrom, (0, combi_1.altPrio)(sql_into_structure_1.SQLIntoStructure, _1.SQLIntoList), where, _1.SQLClient, bypass, sql_group_by_1.SQLGroupBy, fields, _1.DatabaseConnection, _1.SQLHints);
6421
+ const fieldList = (0, combi_1.optPrio)(_1.SQLFieldList);
6395
6422
  const single = (0, combi_1.seq)("SINGLE", (0, combi_1.optPrio)("FOR UPDATE"), fieldList, permSingle);
6396
6423
  const other = (0, combi_1.seq)((0, combi_1.optPrio)("DISTINCT"), fieldList, perm);
6397
6424
  const ret = (0, combi_1.seq)("SELECT", (0, combi_1.altPrio)(single, other));
@@ -6422,6 +6449,8 @@ const sql_hints_1 = __webpack_require__(/*! ./sql_hints */ "./node_modules/@abap
6422
6449
  const sql_field_list_loop_1 = __webpack_require__(/*! ./sql_field_list_loop */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_field_list_loop.js");
6423
6450
  const sql_up_to_1 = __webpack_require__(/*! ./sql_up_to */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_up_to.js");
6424
6451
  const version_1 = __webpack_require__(/*! ../../../version */ "./node_modules/@abaplint/core/build/src/version.js");
6452
+ const sql_fields_loop_1 = __webpack_require__(/*! ./sql_fields_loop */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_fields_loop.js");
6453
+ // note: SELECT loops are matched before single statement SELECTs
6425
6454
  class SelectLoop extends combi_1.Expression {
6426
6455
  getRunnable() {
6427
6456
  const where = (0, combi_1.seq)("WHERE", _1.SQLCond);
@@ -6431,8 +6460,9 @@ class SelectLoop extends combi_1.Expression {
6431
6460
  const packTab = (0, combi_1.seq)(pack, _1.SQLIntoTable);
6432
6461
  const into = (0, combi_1.altPrio)(sql_into_structure_1.SQLIntoStructure, _1.SQLIntoList);
6433
6462
  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, into, packTab));
6434
- const strict = (0, combi_1.seq)(_1.SQLFrom, (0, combi_1.ver)(version_1.Version.v750, _1.SQLFields), (0, combi_1.optPrio)((0, combi_1.seq)(where, into, sql_up_to_1.SQLUpTo)));
6435
- 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), (0, combi_1.optPrio)(sql_hints_1.SQLHints));
6463
+ 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))));
6464
+ const aggr = (0, combi_1.seq)(_1.SQLAggregation, into, _1.SQLFrom, where, _1.SQLGroupBy);
6465
+ 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));
6436
6466
  return ret;
6437
6467
  }
6438
6468
  }
@@ -6674,6 +6704,7 @@ class Source extends combi_1.Expression {
6674
6704
  const method = (0, combi_1.seq)(_1.MethodCallChain, (0, combi_1.optPrio)((0, combi_1.altPrio)(attr, comp)), deref);
6675
6705
  const rparen = (0, combi_1.tok)(tokens_1.WParenRightW);
6676
6706
  const rparenNoSpace = (0, combi_1.altPrio)((0, combi_1.tok)(tokens_1.ParenRightW), (0, combi_1.tok)(tokens_1.WParenRightW));
6707
+ const lparenNoSpace = (0, combi_1.altPrio)((0, combi_1.tok)(tokens_1.ParenLeft), (0, combi_1.tok)(tokens_1.ParenLeftW));
6677
6708
  // paren used for eg. "( 2 + 1 ) * 4"
6678
6709
  const paren = (0, combi_1.seq)((0, combi_1.tok)(tokens_1.WParenLeftW), Source, rparen);
6679
6710
  const after = (0, combi_1.seq)((0, combi_1.altPrio)("&", "&&", _1.ArithOperator), Source);
@@ -6681,7 +6712,7 @@ class Source extends combi_1.Expression {
6681
6712
  const prefix = (0, combi_1.altPrio)((0, combi_1.tok)(tokens_1.WPlus), "BIT-NOT");
6682
6713
  const old = (0, combi_1.seq)((0, combi_1.optPrio)(prefix), (0, combi_1.altPrio)(_1.Constant, _1.StringTemplate, text_element_1.TextElement, bool, method, (0, combi_1.seq)(_1.FieldChain, deref), paren), (0, combi_1.optPrio)(after));
6683
6714
  const corr = (0, combi_1.ver)(version_1.Version.v740sp05, (0, combi_1.seq)("CORRESPONDING", _1.TypeNameOrInfer, (0, combi_1.tok)(tokens_1.ParenLeftW), _1.CorrespondingBody, rparen, (0, combi_1.optPrio)(after)));
6684
- const conv = (0, combi_1.ver)(version_1.Version.v740sp02, (0, combi_1.seq)("CONV", _1.TypeNameOrInfer, (0, combi_1.tok)(tokens_1.ParenLeftW), _1.ConvBody, rparenNoSpace, (0, combi_1.optPrio)(after)));
6715
+ const conv = (0, combi_1.ver)(version_1.Version.v740sp02, (0, combi_1.seq)("CONV", _1.TypeNameOrInfer, lparenNoSpace, _1.ConvBody, rparenNoSpace, (0, combi_1.optPrio)(after)));
6685
6716
  const swit = (0, combi_1.ver)(version_1.Version.v740sp02, (0, combi_1.seq)("SWITCH", _1.TypeNameOrInfer, (0, combi_1.tok)(tokens_1.ParenLeftW), _1.SwitchBody, rparenNoSpace, (0, combi_1.optPrio)(after)));
6686
6717
  const value = (0, combi_1.ver)(version_1.Version.v740sp02, (0, combi_1.seq)("VALUE", _1.TypeNameOrInfer, (0, combi_1.tok)(tokens_1.ParenLeftW), _1.ValueBody, rparenNoSpace, (0, combi_1.optPrio)(after)));
6687
6718
  const cond = (0, combi_1.ver)(version_1.Version.v740sp02, (0, combi_1.seq)("COND", _1.TypeNameOrInfer, (0, combi_1.tok)(tokens_1.ParenLeftW), _1.CondBody, rparenNoSpace, (0, combi_1.optPrio)(after)));
@@ -6743,6 +6774,29 @@ exports.SourceFieldSymbol = SourceFieldSymbol;
6743
6774
 
6744
6775
  /***/ }),
6745
6776
 
6777
+ /***/ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/source_field_symbol_chain.js":
6778
+ /*!**********************************************************************************************************!*\
6779
+ !*** ./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/source_field_symbol_chain.js ***!
6780
+ \**********************************************************************************************************/
6781
+ /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
6782
+
6783
+ "use strict";
6784
+
6785
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
6786
+ exports.SourceFieldSymbolChain = void 0;
6787
+ const combi_1 = __webpack_require__(/*! ../combi */ "./node_modules/@abaplint/core/build/src/abap/2_statements/combi.js");
6788
+ const _1 = __webpack_require__(/*! . */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js");
6789
+ class SourceFieldSymbolChain extends combi_1.Expression {
6790
+ getRunnable() {
6791
+ const chain = (0, combi_1.seq)(new _1.ArrowOrDash(), _1.ComponentName);
6792
+ return (0, combi_1.seq)(_1.FieldSymbol, (0, combi_1.starPrio)(chain));
6793
+ }
6794
+ }
6795
+ exports.SourceFieldSymbolChain = SourceFieldSymbolChain;
6796
+ //# sourceMappingURL=source_field_symbol_chain.js.map
6797
+
6798
+ /***/ }),
6799
+
6746
6800
  /***/ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_aggregation.js":
6747
6801
  /*!************************************************************************************************!*\
6748
6802
  !*** ./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_aggregation.js ***!
@@ -6760,7 +6814,7 @@ const dynamic_1 = __webpack_require__(/*! ./dynamic */ "./node_modules/@abaplint
6760
6814
  const sql_arithmetics_1 = __webpack_require__(/*! ./sql_arithmetics */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_arithmetics.js");
6761
6815
  class SQLAggregation extends combi_1.Expression {
6762
6816
  getRunnable() {
6763
- const f = (0, combi_1.seq)((0, combi_1.optPrio)("DISTINCT"), (0, combi_1.altPrio)(sql_arithmetics_1.SQLArithmetics, dynamic_1.Dynamic, _1.SQLFunction));
6817
+ const f = (0, combi_1.seq)((0, combi_1.optPrio)("DISTINCT"), (0, combi_1.altPrio)(_1.SQLCase, sql_arithmetics_1.SQLArithmetics, dynamic_1.Dynamic, _1.SQLFunction));
6764
6818
  const fparen = (0, combi_1.seq)("(", _1.Field, ")");
6765
6819
  const count = (0, combi_1.seq)("COUNT", (0, combi_1.altPrio)((0, combi_1.tok)(tokens_1.ParenLeft), (0, combi_1.tok)(tokens_1.ParenLeftW)), (0, combi_1.optPrio)("DISTINCT"), (0, combi_1.altPrio)("*", _1.Field, fparen), ")");
6766
6820
  const max = (0, combi_1.seq)("MAX", (0, combi_1.altPrio)((0, combi_1.tok)(tokens_1.ParenLeft), (0, combi_1.tok)(tokens_1.ParenLeftW)), f, ")");
@@ -6889,8 +6943,9 @@ class SQLCase extends combi_1.Expression {
6889
6943
  getRunnable() {
6890
6944
  const field = (0, combi_1.altPrio)(_1.SQLAggregation, SQLCase, _1.SQLFunction, _1.SQLPath, sql_field_name_1.SQLFieldName, constant_1.Constant);
6891
6945
  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)));
6892
- const sourc = (0, combi_1.altPrio)(SQLCase, _1.SQLAggregation, _1.SQLFunction, sql_source_1.SQLSource);
6893
- const when = (0, combi_1.seq)("WHEN", (0, combi_1.altPrio)(sql_cond_1.SQLCond, constant_1.Constant), "THEN", sourc, (0, combi_1.starPrio)(sub));
6946
+ const sourc = (0, combi_1.altPrio)(SQLCase, _1.SQLAggregation, _1.SQLFunction, sql_source_1.SQLSource, constant_1.Constant);
6947
+ const val = (0, combi_1.altPrio)(sql_cond_1.SQLCond, constant_1.Constant, (0, combi_1.seq)((0, combi_1.tok)(tokens_1.WAt), _1.SimpleSource3));
6948
+ const when = (0, combi_1.seq)("WHEN", val, "THEN", sourc, (0, combi_1.starPrio)(sub));
6894
6949
  const els = (0, combi_1.seq)("ELSE", sourc);
6895
6950
  return (0, combi_1.ver)(version_1.Version.v740sp05, (0, combi_1.seq)("CASE", (0, combi_1.opt)(sql_field_name_1.SQLFieldName), (0, combi_1.plusPrio)(when), (0, combi_1.optPrio)(els), "END"));
6896
6951
  }
@@ -6966,15 +7021,16 @@ const tokens_1 = __webpack_require__(/*! ../../1_lexer/tokens */ "./node_modules
6966
7021
  class SQLCompare extends combi_1.Expression {
6967
7022
  getRunnable() {
6968
7023
  const subSelect = (0, combi_1.seq)("(", _1.Select, ")");
7024
+ const subSelectDouble = (0, combi_1.seq)("(", "(", _1.Select, ")", ")");
6969
7025
  const between = (0, combi_1.seq)("BETWEEN", _1.SQLSource, "AND", _1.SQLSource);
6970
7026
  const like = (0, combi_1.seq)("LIKE", _1.SQLSource, (0, combi_1.optPrio)((0, combi_1.seq)("ESCAPE", _1.SQLSource)));
6971
7027
  const nul = (0, combi_1.seq)("IS", (0, combi_1.optPrio)("NOT"), (0, combi_1.altPrio)("NULL", (0, combi_1.ver)(version_1.Version.v753, "INITIAL")));
6972
7028
  const source = new _1.SQLSource();
6973
- const sub = (0, combi_1.seq)((0, combi_1.optPrio)((0, combi_1.altPrio)("ALL", "ANY", "SOME")), subSelect);
7029
+ const sub = (0, combi_1.seq)((0, combi_1.optPrio)((0, combi_1.altPrio)("ALL", "ANY", "SOME")), (0, combi_1.altPrio)(subSelect, subSelectDouble));
6974
7030
  const arith = (0, combi_1.ver)(version_1.Version.v750, (0, combi_1.plusPrio)((0, combi_1.seq)((0, combi_1.altPrio)("+", "-", "*", "/"), _1.SQLFieldName)));
6975
7031
  const paren = (0, combi_1.seq)((0, combi_1.tok)(tokens_1.ParenLeftW), _1.Source, (0, combi_1.tok)(tokens_1.WParenRightW));
6976
7032
  const at = (0, combi_1.ver)(version_1.Version.v740sp05, (0, combi_1.seq)((0, combi_1.tok)(tokens_1.WAt), (0, combi_1.altPrio)(_1.SimpleSource3, paren)));
6977
- const rett = (0, combi_1.seq)((0, combi_1.altPrio)(_1.SQLFunction, (0, combi_1.seq)(_1.SQLFieldName, (0, combi_1.optPrio)(arith)), at), (0, combi_1.altPrio)((0, combi_1.seq)(_1.SQLCompareOperator, (0, combi_1.altPrio)(sub, source)), (0, combi_1.seq)((0, combi_1.optPrio)("NOT"), (0, combi_1.altPrio)(_1.SQLIn, like, between)), nul));
7033
+ const rett = (0, combi_1.seq)((0, combi_1.altPrio)(_1.SQLFunction, _1.ConstantString, (0, combi_1.seq)((0, combi_1.altPrio)(_1.SQLPath, _1.SQLFieldName), (0, combi_1.optPrio)(arith)), at), (0, combi_1.altPrio)((0, combi_1.seq)(_1.SQLCompareOperator, (0, combi_1.altPrio)(sub, source)), (0, combi_1.seq)((0, combi_1.optPrio)("NOT"), (0, combi_1.altPrio)(_1.SQLIn, like, between)), nul));
6978
7034
  const exists = (0, combi_1.seq)("EXISTS", subSelect);
6979
7035
  return (0, combi_1.altPrio)(exists, _1.Dynamic, rett);
6980
7036
  }
@@ -7105,11 +7161,13 @@ exports.SQLFieldList = void 0;
7105
7161
  const combi_1 = __webpack_require__(/*! ../combi */ "./node_modules/@abaplint/core/build/src/abap/2_statements/combi.js");
7106
7162
  const _1 = __webpack_require__(/*! . */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js");
7107
7163
  const version_1 = __webpack_require__(/*! ../../../version */ "./node_modules/@abaplint/core/build/src/version.js");
7164
+ const tokens_1 = __webpack_require__(/*! ../../1_lexer/tokens */ "./node_modules/@abaplint/core/build/src/abap/1_lexer/tokens/index.js");
7108
7165
  class SQLFieldList extends combi_1.Expression {
7109
7166
  getRunnable() {
7167
+ const paren = (0, combi_1.seq)((0, combi_1.tok)(tokens_1.WParenLeftW), _1.SQLFieldName, (0, combi_1.tok)(tokens_1.WParenRightW));
7110
7168
  const nev = (0, combi_1.ver)(version_1.Version.v740sp05, (0, combi_1.starPrio)((0, combi_1.seq)(",", _1.SQLField)));
7111
7169
  const old = (0, combi_1.starPrio)(_1.SQLField);
7112
- return (0, combi_1.altPrio)("*", _1.Dynamic, (0, combi_1.seq)(_1.SQLField, (0, combi_1.alt)(nev, old)));
7170
+ return (0, combi_1.altPrio)("*", _1.Dynamic, (0, combi_1.seq)(_1.SQLField, (0, combi_1.alt)(nev, old)), paren);
7113
7171
  }
7114
7172
  }
7115
7173
  exports.SQLFieldList = SQLFieldList;
@@ -7131,13 +7189,15 @@ const combi_1 = __webpack_require__(/*! ../combi */ "./node_modules/@abaplint/co
7131
7189
  const _1 = __webpack_require__(/*! . */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js");
7132
7190
  const version_1 = __webpack_require__(/*! ../../../version */ "./node_modules/@abaplint/core/build/src/version.js");
7133
7191
  const sql_path_1 = __webpack_require__(/*! ./sql_path */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_path.js");
7192
+ const tokens_1 = __webpack_require__(/*! ../../1_lexer/tokens */ "./node_modules/@abaplint/core/build/src/abap/1_lexer/tokens/index.js");
7134
7193
  // loop must include one field from the database table
7135
7194
  class SQLFieldListLoop extends combi_1.Expression {
7136
7195
  getRunnable() {
7137
7196
  const comma = (0, combi_1.opt)((0, combi_1.ver)(version_1.Version.v740sp05, ","));
7138
7197
  const as = (0, combi_1.seq)("AS", _1.SQLAsName);
7139
7198
  const someField = (0, combi_1.seq)(_1.SQLField, comma);
7140
- const fieldList = (0, combi_1.seq)((0, combi_1.star)(someField), (0, combi_1.alt)(_1.SQLFieldName, sql_path_1.SQLPath, _1.Constant), (0, combi_1.optPrio)(as), comma, (0, combi_1.star)(someField));
7199
+ const abap = (0, combi_1.ver)(version_1.Version.v740sp05, (0, combi_1.seq)((0, combi_1.tok)(tokens_1.WAt), _1.SimpleFieldChain));
7200
+ const fieldList = (0, combi_1.seq)((0, combi_1.star)(someField), (0, combi_1.alt)(_1.SQLFieldName, abap, sql_path_1.SQLPath, _1.Constant), (0, combi_1.optPrio)(as), comma, (0, combi_1.star)(someField));
7141
7201
  const fields = (0, combi_1.alt)("*", _1.Dynamic, fieldList);
7142
7202
  return fields;
7143
7203
  }
@@ -7190,6 +7250,28 @@ exports.SQLFields = SQLFields;
7190
7250
 
7191
7251
  /***/ }),
7192
7252
 
7253
+ /***/ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_fields_loop.js":
7254
+ /*!************************************************************************************************!*\
7255
+ !*** ./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_fields_loop.js ***!
7256
+ \************************************************************************************************/
7257
+ /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
7258
+
7259
+ "use strict";
7260
+
7261
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
7262
+ exports.SQLFieldsLoop = void 0;
7263
+ const combi_1 = __webpack_require__(/*! ../combi */ "./node_modules/@abaplint/core/build/src/abap/2_statements/combi.js");
7264
+ const _1 = __webpack_require__(/*! . */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js");
7265
+ class SQLFieldsLoop extends combi_1.Expression {
7266
+ getRunnable() {
7267
+ return (0, combi_1.seq)("FIELDS", (0, combi_1.opt)("DISTINCT"), _1.SQLFieldListLoop);
7268
+ }
7269
+ }
7270
+ exports.SQLFieldsLoop = SQLFieldsLoop;
7271
+ //# sourceMappingURL=sql_fields_loop.js.map
7272
+
7273
+ /***/ }),
7274
+
7193
7275
  /***/ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_for_all_entries.js":
7194
7276
  /*!****************************************************************************************************!*\
7195
7277
  !*** ./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_for_all_entries.js ***!
@@ -7276,37 +7358,29 @@ exports.SQLFromSource = SQLFromSource;
7276
7358
 
7277
7359
  Object.defineProperty(exports, "__esModule", ({ value: true }));
7278
7360
  exports.SQLFunction = void 0;
7279
- const constant_1 = __webpack_require__(/*! ./constant */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/constant.js");
7280
7361
  const version_1 = __webpack_require__(/*! ../../../version */ "./node_modules/@abaplint/core/build/src/version.js");
7281
7362
  const tokens_1 = __webpack_require__(/*! ../../1_lexer/tokens */ "./node_modules/@abaplint/core/build/src/abap/1_lexer/tokens/index.js");
7282
7363
  const combi_1 = __webpack_require__(/*! ../combi */ "./node_modules/@abaplint/core/build/src/abap/2_statements/combi.js");
7283
7364
  const integer_1 = __webpack_require__(/*! ./integer */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/integer.js");
7284
- const sql_alias_field_1 = __webpack_require__(/*! ./sql_alias_field */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_alias_field.js");
7285
- const sql_field_name_1 = __webpack_require__(/*! ./sql_field_name */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_field_name.js");
7286
- const simple_source3_1 = __webpack_require__(/*! ./simple_source3 */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/simple_source3.js");
7287
- const source_1 = __webpack_require__(/*! ./source */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/source.js");
7288
- const sql_aggregation_1 = __webpack_require__(/*! ./sql_aggregation */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_aggregation.js");
7365
+ const sql_function_input_1 = __webpack_require__(/*! ./sql_function_input */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_function_input.js");
7289
7366
  class SQLFunction extends combi_1.Expression {
7290
7367
  getRunnable() {
7291
- const paren = (0, combi_1.seq)((0, combi_1.tok)(tokens_1.ParenLeftW), source_1.Source, (0, combi_1.tok)(tokens_1.WParenRightW));
7292
- const at = (0, combi_1.ver)(version_1.Version.v740sp05, (0, combi_1.seq)((0, combi_1.tok)(tokens_1.WAt), (0, combi_1.altPrio)(simple_source3_1.SimpleSource3, paren)));
7293
- const param = (0, combi_1.altPrio)(SQLFunction, sql_aggregation_1.SQLAggregation, sql_field_name_1.SQLFieldName, sql_alias_field_1.SQLAliasField, constant_1.Constant, at);
7294
7368
  const castTypes = (0, combi_1.altPrio)((0, combi_1.seq)("CHAR", (0, combi_1.tok)(tokens_1.ParenLeftW), integer_1.Integer, (0, combi_1.tok)(tokens_1.WParenRightW)), (0, combi_1.seq)("DEC", (0, combi_1.tok)(tokens_1.ParenLeftW), integer_1.Integer, ",", integer_1.Integer, (0, combi_1.tok)(tokens_1.WParenRightW)), "FLTP", "NUMC", "INT8");
7295
- const commaParam = (0, combi_1.seq)(",", param);
7369
+ const commaParam = (0, combi_1.seq)(",", sql_function_input_1.SQLFunctionInput);
7296
7370
  // note: the function names are not keywords, they are usually in lower case
7297
- const abs = (0, combi_1.ver)(version_1.Version.v740sp05, (0, combi_1.seq)((0, combi_1.regex)(/^abs$/i), (0, combi_1.tok)(tokens_1.ParenLeftW), param, (0, combi_1.tok)(tokens_1.WParenRightW)));
7298
- const cast = (0, combi_1.ver)(version_1.Version.v750, (0, combi_1.seq)((0, combi_1.regex)(/^cast$/i), (0, combi_1.tok)(tokens_1.ParenLeftW), param, "AS", castTypes, (0, combi_1.tok)(tokens_1.WParenRightW)));
7299
- const ceil = (0, combi_1.ver)(version_1.Version.v740sp05, (0, combi_1.seq)((0, combi_1.regex)(/^ceil$/i), (0, combi_1.tok)(tokens_1.ParenLeftW), param, (0, combi_1.tok)(tokens_1.WParenRightW)));
7300
- const coalesce = (0, combi_1.ver)(version_1.Version.v740sp05, (0, combi_1.seq)((0, combi_1.regex)(/^coalesce$/i), (0, combi_1.tok)(tokens_1.ParenLeftW), param, commaParam, (0, combi_1.optPrio)(commaParam), (0, combi_1.tok)(tokens_1.WParenRightW)));
7301
- const concat = (0, combi_1.ver)(version_1.Version.v750, (0, combi_1.seq)((0, combi_1.regex)(/^concat$/i), (0, combi_1.tok)(tokens_1.ParenLeftW), param, commaParam, (0, combi_1.tok)(tokens_1.WParenRightW)));
7302
- const div = (0, combi_1.ver)(version_1.Version.v740sp05, (0, combi_1.seq)((0, combi_1.regex)(/^div$/i), (0, combi_1.tok)(tokens_1.ParenLeftW), param, commaParam, (0, combi_1.tok)(tokens_1.WParenRightW)));
7303
- const floor = (0, combi_1.ver)(version_1.Version.v740sp05, (0, combi_1.seq)((0, combi_1.regex)(/^floor$/i), (0, combi_1.tok)(tokens_1.ParenLeftW), param, (0, combi_1.tok)(tokens_1.WParenRightW)));
7304
- const length = (0, combi_1.ver)(version_1.Version.v750, (0, combi_1.seq)((0, combi_1.regex)(/^length$/i), (0, combi_1.tok)(tokens_1.ParenLeftW), param, (0, combi_1.tok)(tokens_1.WParenRightW)));
7305
- const lower = (0, combi_1.ver)(version_1.Version.v751, (0, combi_1.seq)((0, combi_1.regex)(/^lower$/i), (0, combi_1.tok)(tokens_1.ParenLeftW), param, (0, combi_1.tok)(tokens_1.WParenRightW)));
7306
- const mod = (0, combi_1.ver)(version_1.Version.v740sp05, (0, combi_1.seq)((0, combi_1.regex)(/^mod$/i), (0, combi_1.tok)(tokens_1.ParenLeftW), param, commaParam, (0, combi_1.tok)(tokens_1.WParenRightW)));
7307
- const replace = (0, combi_1.ver)(version_1.Version.v750, (0, combi_1.seq)((0, combi_1.regex)(/^replace$/i), (0, combi_1.tok)(tokens_1.ParenLeftW), param, commaParam, commaParam, (0, combi_1.tok)(tokens_1.WParenRightW)));
7308
- const round = (0, combi_1.ver)(version_1.Version.v750, (0, combi_1.seq)((0, combi_1.regex)(/^round$/i), (0, combi_1.tok)(tokens_1.ParenLeftW), param, commaParam, (0, combi_1.tok)(tokens_1.WParenRightW)));
7309
- const upper = (0, combi_1.ver)(version_1.Version.v751, (0, combi_1.seq)((0, combi_1.regex)(/^upper$/i), (0, combi_1.tok)(tokens_1.ParenLeftW), param, (0, combi_1.tok)(tokens_1.WParenRightW)));
7371
+ const abs = (0, combi_1.ver)(version_1.Version.v740sp05, (0, combi_1.seq)((0, combi_1.regex)(/^abs$/i), (0, combi_1.tok)(tokens_1.ParenLeftW), sql_function_input_1.SQLFunctionInput, (0, combi_1.tok)(tokens_1.WParenRightW)));
7372
+ const cast = (0, combi_1.ver)(version_1.Version.v750, (0, combi_1.seq)((0, combi_1.regex)(/^cast$/i), (0, combi_1.tok)(tokens_1.ParenLeftW), sql_function_input_1.SQLFunctionInput, "AS", castTypes, (0, combi_1.tok)(tokens_1.WParenRightW)));
7373
+ const ceil = (0, combi_1.ver)(version_1.Version.v740sp05, (0, combi_1.seq)((0, combi_1.regex)(/^ceil$/i), (0, combi_1.tok)(tokens_1.ParenLeftW), sql_function_input_1.SQLFunctionInput, (0, combi_1.tok)(tokens_1.WParenRightW)));
7374
+ const coalesce = (0, combi_1.ver)(version_1.Version.v740sp05, (0, combi_1.seq)((0, combi_1.regex)(/^coalesce$/i), (0, combi_1.tok)(tokens_1.ParenLeftW), sql_function_input_1.SQLFunctionInput, commaParam, (0, combi_1.optPrio)(commaParam), (0, combi_1.tok)(tokens_1.WParenRightW)));
7375
+ const concat = (0, combi_1.ver)(version_1.Version.v750, (0, combi_1.seq)((0, combi_1.regex)(/^concat$/i), (0, combi_1.tok)(tokens_1.ParenLeftW), sql_function_input_1.SQLFunctionInput, commaParam, (0, combi_1.tok)(tokens_1.WParenRightW)));
7376
+ const div = (0, combi_1.ver)(version_1.Version.v740sp05, (0, combi_1.seq)((0, combi_1.regex)(/^div$/i), (0, combi_1.tok)(tokens_1.ParenLeftW), sql_function_input_1.SQLFunctionInput, commaParam, (0, combi_1.tok)(tokens_1.WParenRightW)));
7377
+ const floor = (0, combi_1.ver)(version_1.Version.v740sp05, (0, combi_1.seq)((0, combi_1.regex)(/^floor$/i), (0, combi_1.tok)(tokens_1.ParenLeftW), sql_function_input_1.SQLFunctionInput, (0, combi_1.tok)(tokens_1.WParenRightW)));
7378
+ const length = (0, combi_1.ver)(version_1.Version.v750, (0, combi_1.seq)((0, combi_1.regex)(/^length$/i), (0, combi_1.tok)(tokens_1.ParenLeftW), sql_function_input_1.SQLFunctionInput, (0, combi_1.tok)(tokens_1.WParenRightW)));
7379
+ const lower = (0, combi_1.ver)(version_1.Version.v751, (0, combi_1.seq)((0, combi_1.regex)(/^lower$/i), (0, combi_1.tok)(tokens_1.ParenLeftW), sql_function_input_1.SQLFunctionInput, (0, combi_1.tok)(tokens_1.WParenRightW)));
7380
+ const mod = (0, combi_1.ver)(version_1.Version.v740sp05, (0, combi_1.seq)((0, combi_1.regex)(/^mod$/i), (0, combi_1.tok)(tokens_1.ParenLeftW), sql_function_input_1.SQLFunctionInput, commaParam, (0, combi_1.tok)(tokens_1.WParenRightW)));
7381
+ const replace = (0, combi_1.ver)(version_1.Version.v750, (0, combi_1.seq)((0, combi_1.regex)(/^replace$/i), (0, combi_1.tok)(tokens_1.ParenLeftW), sql_function_input_1.SQLFunctionInput, commaParam, commaParam, (0, combi_1.tok)(tokens_1.WParenRightW)));
7382
+ const round = (0, combi_1.ver)(version_1.Version.v750, (0, combi_1.seq)((0, combi_1.regex)(/^round$/i), (0, combi_1.tok)(tokens_1.ParenLeftW), sql_function_input_1.SQLFunctionInput, commaParam, (0, combi_1.tok)(tokens_1.WParenRightW)));
7383
+ const upper = (0, combi_1.ver)(version_1.Version.v751, (0, combi_1.seq)((0, combi_1.regex)(/^upper$/i), (0, combi_1.tok)(tokens_1.ParenLeftW), sql_function_input_1.SQLFunctionInput, (0, combi_1.tok)(tokens_1.WParenRightW)));
7310
7384
  const uuid = (0, combi_1.ver)(version_1.Version.v754, (0, combi_1.seq)((0, combi_1.regex)(/^uuid$/i), (0, combi_1.tok)(tokens_1.ParenLeftW), (0, combi_1.tok)(tokens_1.WParenRightW)));
7311
7385
  return (0, combi_1.altPrio)(uuid, abs, ceil, floor, cast, div, mod, coalesce, concat, replace, length, lower, upper, round);
7312
7386
  }
@@ -7316,6 +7390,40 @@ exports.SQLFunction = SQLFunction;
7316
7390
 
7317
7391
  /***/ }),
7318
7392
 
7393
+ /***/ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_function_input.js":
7394
+ /*!***************************************************************************************************!*\
7395
+ !*** ./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_function_input.js ***!
7396
+ \***************************************************************************************************/
7397
+ /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
7398
+
7399
+ "use strict";
7400
+
7401
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
7402
+ exports.SQLFunctionInput = void 0;
7403
+ const constant_1 = __webpack_require__(/*! ./constant */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/constant.js");
7404
+ const version_1 = __webpack_require__(/*! ../../../version */ "./node_modules/@abaplint/core/build/src/version.js");
7405
+ const tokens_1 = __webpack_require__(/*! ../../1_lexer/tokens */ "./node_modules/@abaplint/core/build/src/abap/1_lexer/tokens/index.js");
7406
+ const combi_1 = __webpack_require__(/*! ../combi */ "./node_modules/@abaplint/core/build/src/abap/2_statements/combi.js");
7407
+ const sql_alias_field_1 = __webpack_require__(/*! ./sql_alias_field */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_alias_field.js");
7408
+ const sql_field_name_1 = __webpack_require__(/*! ./sql_field_name */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_field_name.js");
7409
+ const simple_source3_1 = __webpack_require__(/*! ./simple_source3 */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/simple_source3.js");
7410
+ const source_1 = __webpack_require__(/*! ./source */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/source.js");
7411
+ const sql_aggregation_1 = __webpack_require__(/*! ./sql_aggregation */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_aggregation.js");
7412
+ const sql_function_1 = __webpack_require__(/*! ./sql_function */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_function.js");
7413
+ class SQLFunctionInput extends combi_1.Expression {
7414
+ getRunnable() {
7415
+ const paren = (0, combi_1.seq)((0, combi_1.tok)(tokens_1.ParenLeftW), source_1.Source, (0, combi_1.tok)(tokens_1.WParenRightW));
7416
+ const at = (0, combi_1.ver)(version_1.Version.v740sp05, (0, combi_1.seq)((0, combi_1.tok)(tokens_1.WAt), (0, combi_1.altPrio)(simple_source3_1.SimpleSource3, paren)));
7417
+ const param = (0, combi_1.altPrio)(sql_function_1.SQLFunction, sql_aggregation_1.SQLAggregation, sql_field_name_1.SQLFieldName, sql_alias_field_1.SQLAliasField, constant_1.Constant, at);
7418
+ const operator = (0, combi_1.altPrio)("+", "-", "*", "/", "&&");
7419
+ return (0, combi_1.seq)(param, (0, combi_1.starPrio)((0, combi_1.seq)(operator, param)));
7420
+ }
7421
+ }
7422
+ exports.SQLFunctionInput = SQLFunctionInput;
7423
+ //# sourceMappingURL=sql_function_input.js.map
7424
+
7425
+ /***/ }),
7426
+
7319
7427
  /***/ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_group_by.js":
7320
7428
  /*!*********************************************************************************************!*\
7321
7429
  !*** ./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_group_by.js ***!
@@ -7354,9 +7462,13 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
7354
7462
  exports.SQLHaving = void 0;
7355
7463
  const combi_1 = __webpack_require__(/*! ../combi */ "./node_modules/@abaplint/core/build/src/abap/2_statements/combi.js");
7356
7464
  const dynamic_1 = __webpack_require__(/*! ./dynamic */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/dynamic.js");
7465
+ const sql_aggregation_1 = __webpack_require__(/*! ./sql_aggregation */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_aggregation.js");
7466
+ const sql_compare_operator_1 = __webpack_require__(/*! ./sql_compare_operator */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_compare_operator.js");
7467
+ const sql_source_1 = __webpack_require__(/*! ./sql_source */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_source.js");
7357
7468
  class SQLHaving extends combi_1.Expression {
7358
7469
  getRunnable() {
7359
- const having = (0, combi_1.seq)("HAVING", dynamic_1.Dynamic);
7470
+ const cond = (0, combi_1.seq)(sql_aggregation_1.SQLAggregation, sql_compare_operator_1.SQLCompareOperator, sql_source_1.SQLSource);
7471
+ const having = (0, combi_1.seq)("HAVING", (0, combi_1.altPrio)(dynamic_1.Dynamic, cond));
7360
7472
  return having;
7361
7473
  }
7362
7474
  }
@@ -7739,7 +7851,7 @@ class StringTemplateFormatting extends combi_1.Expression {
7739
7851
  const alignOptions = (0, combi_1.altPrio)("LEFT", "RIGHT", "CENTER", _1.Source);
7740
7852
  const dateTimeOptions = (0, combi_1.altPrio)("RAW", "ISO", "USER", "ENVIRONMENT", _1.Source, dynamic_1.Dynamic);
7741
7853
  const timeStampOptions = (0, combi_1.altPrio)("SPACE", "ISO", "USER", "ENVIRONMENT", _1.Source);
7742
- const numberOptions = (0, combi_1.altPrio)("RAW", "USER", "ENVIRONMENT", _1.Source);
7854
+ const numberOptions = (0, combi_1.altPrio)("RAW", "USER", "ENVIRONMENT", _1.Source, dynamic_1.Dynamic);
7743
7855
  const signOptions = (0, combi_1.altPrio)("LEFT", "LEFTPLUS", "LEFTSPACE", "RIGHT", "RIGHTPLUS", "RIGHTSPACE", _1.Source);
7744
7856
  const caseOptions = (0, combi_1.altPrio)("RAW", "UPPER", "LOWER", _1.Source, dynamic_1.Dynamic);
7745
7857
  const zeroXSDOptions = (0, combi_1.altPrio)("YES", "NO", _1.Source);
@@ -7951,7 +8063,7 @@ const combi_1 = __webpack_require__(/*! ../combi */ "./node_modules/@abaplint/co
7951
8063
  const _1 = __webpack_require__(/*! . */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js");
7952
8064
  class TargetFieldSymbol extends combi_1.Expression {
7953
8065
  getRunnable() {
7954
- return new _1.FieldSymbol();
8066
+ return (0, combi_1.seq)(_1.FieldSymbol, (0, combi_1.optPrio)(_1.TableBody));
7955
8067
  }
7956
8068
  }
7957
8069
  exports.TargetFieldSymbol = TargetFieldSymbol;
@@ -8066,8 +8178,8 @@ const _1 = __webpack_require__(/*! . */ "./node_modules/@abaplint/core/build/src
8066
8178
  const tokens_1 = __webpack_require__(/*! ../../1_lexer/tokens */ "./node_modules/@abaplint/core/build/src/abap/1_lexer/tokens/index.js");
8067
8179
  class Throw extends combi_1.Expression {
8068
8180
  getRunnable() {
8069
- // todo, MESSAGE
8070
- return (0, combi_1.seq)("THROW", (0, combi_1.opt)("RESUMABLE"), _1.ClassName, (0, combi_1.altPrio)((0, combi_1.tok)(tokens_1.ParenLeftW), (0, combi_1.tok)(tokens_1.ParenLeft)), (0, combi_1.opt)((0, combi_1.alt)(_1.Source, _1.ParameterListS)), (0, combi_1.altPrio)((0, combi_1.tok)(tokens_1.WParenRightW), (0, combi_1.tok)(tokens_1.ParenRightW)));
8181
+ const message = (0, combi_1.seq)("MESSAGE", _1.MessageSource, (0, combi_1.opt)(_1.RaiseWith));
8182
+ return (0, combi_1.seq)("THROW", (0, combi_1.opt)("RESUMABLE"), _1.ClassName, (0, combi_1.altPrio)((0, combi_1.tok)(tokens_1.ParenLeftW), (0, combi_1.tok)(tokens_1.ParenLeft)), (0, combi_1.opt)((0, combi_1.alt)(_1.Source, _1.ParameterListS, message)), (0, combi_1.altPrio)((0, combi_1.tok)(tokens_1.WParenRightW), (0, combi_1.tok)(tokens_1.ParenRightW)));
8071
8183
  }
8072
8184
  }
8073
8185
  exports.Throw = Throw;
@@ -8216,8 +8328,18 @@ class TypeStructure extends combi_1.Expression {
8216
8328
  getRunnable() {
8217
8329
  // todo, add version,
8218
8330
  const hier = (0, combi_1.seq)("HIERARCHY", _1.NamespaceSimpleName);
8331
+ const create = (0, combi_1.seq)("CREATE", (0, combi_1.alt)(_1.NamespaceSimpleName, _1.EntityAssociation));
8332
+ const update = (0, combi_1.seq)("UPDATE", (0, combi_1.alt)(_1.NamespaceSimpleName, _1.EntityAssociation));
8333
+ const readResult = (0, combi_1.seq)("READ RESULT", (0, combi_1.alt)(_1.NamespaceSimpleName, _1.EntityAssociation));
8334
+ const action = (0, combi_1.seq)("ACTION IMPORT", _1.Source);
8335
+ const permissionsRequest = (0, combi_1.seq)("PERMISSIONS REQUEST", _1.NamespaceSimpleName);
8219
8336
  const evt = (0, combi_1.seq)("EVENT", _1.EventName);
8220
- return (0, combi_1.seq)("TYPE STRUCTURE FOR", (0, combi_1.altPrio)(hier, evt));
8337
+ const failedEarly = (0, combi_1.seq)("FAILED EARLY", _1.NamespaceSimpleName);
8338
+ const mappedEarly = (0, combi_1.seq)("MAPPED EARLY", _1.NamespaceSimpleName);
8339
+ const reportedEarly = (0, combi_1.seq)("REPORTED EARLY", _1.NamespaceSimpleName);
8340
+ const structure = (0, combi_1.seq)("STRUCTURE FOR", (0, combi_1.altPrio)(hier, evt, create, update, action, permissionsRequest, readResult));
8341
+ const response = (0, combi_1.seq)("RESPONSE FOR", (0, combi_1.altPrio)(failedEarly, mappedEarly, reportedEarly));
8342
+ return (0, combi_1.seq)("TYPE", (0, combi_1.altPrio)(structure, response));
8221
8343
  }
8222
8344
  }
8223
8345
  exports.TypeStructure = TypeStructure;
@@ -8247,16 +8369,17 @@ class TypeTable extends combi_1.Expression {
8247
8369
  const generic = (0, combi_1.seq)((0, combi_1.opt)((0, combi_1.alt)("STANDARD", "HASHED", "INDEX", "SORTED", "ANY")), "TABLE");
8248
8370
  const normal1 = (0, combi_1.seq)((0, combi_1.opt)((0, combi_1.alt)("STANDARD", "HASHED", "INDEX", "SORTED", "ANY")), "TABLE OF", (0, combi_1.optPrio)("REF TO"), _1.TypeName);
8249
8371
  const likeType = (0, combi_1.seq)((0, combi_1.opt)((0, combi_1.alt)("STANDARD", "HASHED", "INDEX", "SORTED", "ANY")), "TABLE OF", (0, combi_1.optPrio)("REF TO"), (0, combi_1.opt)(field_chain_1.FieldChain), (0, combi_1.opt)((0, combi_1.per)(header, initial, (0, combi_1.plusPrio)(type_table_key_1.TypeTableKey))));
8250
- const rangeType = (0, combi_1.seq)("RANGE OF", _1.TypeName, (0, combi_1.optPrio)(header), (0, combi_1.optPrio)(initial));
8251
- const rangeLike = (0, combi_1.seq)("RANGE OF", field_chain_1.FieldChain, (0, combi_1.optPrio)(header), (0, combi_1.optPrio)(initial));
8372
+ const rangeType = (0, combi_1.seq)("RANGE OF", _1.TypeName, (0, combi_1.optPrio)(header), (0, combi_1.optPrio)(initial), (0, combi_1.optPrio)("VALUE IS INITIAL"));
8373
+ const rangeLike = (0, combi_1.seq)("RANGE OF", field_chain_1.FieldChain, (0, combi_1.optPrio)(header), (0, combi_1.optPrio)(initial), (0, combi_1.optPrio)("VALUE IS INITIAL"));
8252
8374
  // a maximum of 15 secondary table keys can be defined
8253
8375
  // "WITH" is not allowed as a field name in keys
8254
8376
  const typetable = (0, combi_1.alt)(generic, (0, combi_1.seq)(normal1, (0, combi_1.alt)((0, combi_1.opt)((0, combi_1.per)(header, initial, (0, combi_1.plusPrio)(type_table_key_1.TypeTableKey))), (0, combi_1.seq)((0, combi_1.plus)(type_table_key_1.TypeTableKey), (0, combi_1.optPrio)(initial)))));
8255
- const occurs = (0, combi_1.seq)("OCCURS", _1.Integer);
8256
- const derived = (0, combi_1.ver)(version_1.Version.v754, (0, combi_1.seq)("TABLE FOR", (0, combi_1.altPrio)("ACTION IMPORT", "ACTION RESULT", "CREATE", "EVENT", "FAILED", "LOCK", "READ RESULT", "UPDATE"), _1.TypeName));
8377
+ const occurs = (0, combi_1.seq)("OCCURS", (0, combi_1.altPrio)(_1.Integer, field_chain_1.FieldChain));
8378
+ const derived = (0, combi_1.ver)(version_1.Version.v754, (0, combi_1.seq)("TABLE FOR", (0, combi_1.altPrio)("ACTION IMPORT", "ACTION RESULT", "CREATE", "EVENT", "REPORTED EARLY", "FAILED EARLY", "FAILED", "LOCK", "DETERMINATION", "READ RESULT", "UPDATE"), (0, combi_1.alt)(_1.TypeName, _1.EntityAssociation)));
8257
8379
  const oldType = (0, combi_1.seq)((0, combi_1.opt)("REF TO"), _1.TypeName, (0, combi_1.alt)((0, combi_1.seq)(occurs, (0, combi_1.opt)(header)), header));
8258
8380
  const oldLike = (0, combi_1.seq)((0, combi_1.opt)("REF TO"), field_chain_1.FieldChain, (0, combi_1.alt)((0, combi_1.seq)(occurs, (0, combi_1.opt)(header)), header));
8259
- const ret = (0, combi_1.altPrio)((0, combi_1.seq)(occurs, (0, combi_1.opt)(header)), (0, combi_1.seq)("LIKE", (0, combi_1.alt)(oldLike, likeType, rangeLike)), (0, combi_1.seq)("TYPE", (0, combi_1.alt)(oldType, typetable, rangeType, derived)));
8381
+ const typeLine = (0, combi_1.seq)("LINE OF", _1.TypeName, occurs, header);
8382
+ const ret = (0, combi_1.altPrio)((0, combi_1.seq)(occurs, (0, combi_1.opt)(header)), (0, combi_1.seq)("LIKE", (0, combi_1.alt)(oldLike, likeType, rangeLike, typeLine)), (0, combi_1.seq)("TYPE", (0, combi_1.alt)(oldType, typetable, rangeType, typeLine, derived)));
8260
8383
  return ret;
8261
8384
  }
8262
8385
  }
@@ -8285,7 +8408,8 @@ class TypeTableKey extends combi_1.Expression {
8285
8408
  const emptyKey = (0, combi_1.ver)(version_1.Version.v740sp02, "EMPTY KEY");
8286
8409
  const components = (0, combi_1.plus)((0, combi_1.alt)((0, combi_1.seq)("WITH", (0, combi_1.failStar)()), _1.FieldSub));
8287
8410
  const further = (0, combi_1.seq)((0, combi_1.alt)("WITHOUT", "WITH"), "FURTHER SECONDARY KEYS");
8288
- const key = (0, combi_1.seq)("WITH", (0, combi_1.opt)(uniqueness), (0, combi_1.altPrio)(defaultKey, emptyKey, (0, combi_1.seq)((0, combi_1.opt)((0, combi_1.alt)("SORTED", "HASHED")), "KEY", (0, combi_1.alt)((0, combi_1.seq)(_1.Field, "COMPONENTS", components), components))), (0, combi_1.optPrio)(further), (0, combi_1.optPrio)("READ-ONLY"));
8411
+ const alias = (0, combi_1.seq)("ALIAS", _1.Field);
8412
+ const key = (0, combi_1.seq)("WITH", (0, combi_1.opt)(uniqueness), (0, combi_1.altPrio)(defaultKey, emptyKey, (0, combi_1.seq)((0, combi_1.opt)((0, combi_1.alt)("SORTED", "HASHED")), "KEY", (0, combi_1.alt)((0, combi_1.seq)(_1.Field, (0, combi_1.opt)(alias), "COMPONENTS", components), components))), (0, combi_1.optPrio)(further), (0, combi_1.optPrio)("READ-ONLY"));
8289
8413
  return key;
8290
8414
  }
8291
8415
  }
@@ -8432,7 +8556,7 @@ class WriteOffsetLength extends combi_1.Expression {
8432
8556
  getRunnable() {
8433
8557
  const post = (0, combi_1.seq)((0, combi_1.alt)(simple_field_chain2_1.SimpleFieldChain2, (0, combi_1.regex)(/^[\d]+$/), (0, combi_1.regex)(/^\*$/)), (0, combi_1.alt)((0, combi_1.tok)(tokens_1.ParenRightW), (0, combi_1.tok)(tokens_1.ParenRight)));
8434
8558
  const wlength = (0, combi_1.seq)((0, combi_1.tok)(tokens_1.WParenLeft), post);
8435
- const length = (0, combi_1.seq)((0, combi_1.tok)(tokens_1.ParenLeft), post);
8559
+ const length = (0, combi_1.seq)((0, combi_1.alt)((0, combi_1.tok)(tokens_1.WParenLeft), (0, combi_1.tok)(tokens_1.ParenLeft)), post);
8436
8560
  const complex = (0, combi_1.alt)(wlength, (0, combi_1.seq)((0, combi_1.alt)(simple_field_chain2_1.SimpleFieldChain2, (0, combi_1.regex)(/^\/?[\w\d]+$/), "/"), (0, combi_1.opt)(length)));
8437
8561
  const at = (0, combi_1.seq)((0, combi_1.opt)("AT"), complex);
8438
8562
  return at;
@@ -8659,8 +8783,13 @@ class StatementParser {
8659
8783
  || type instanceof Statements.EndMethod) {
8660
8784
  sql = false;
8661
8785
  }
8662
- else if (!(type instanceof _statement_1.Comment)) {
8786
+ else {
8663
8787
  wa.statements[i] = new nodes_1.StatementNode(new _statement_1.NativeSQL()).setChildren(this.tokensToNodes(statement.getTokens()));
8788
+ if (statement.concatTokens().toUpperCase().endsWith("ENDMETHOD.")) {
8789
+ // yea, this is not completely correct
8790
+ wa.statements[i] = new nodes_1.StatementNode(new Statements.EndMethod()).setChildren(this.tokensToNodes(statement.getTokens()));
8791
+ sql = false;
8792
+ }
8664
8793
  }
8665
8794
  }
8666
8795
  }
@@ -8847,7 +8976,9 @@ const expressions_1 = __webpack_require__(/*! ../expressions */ "./node_modules/
8847
8976
  class Add {
8848
8977
  getMatcher() {
8849
8978
  const to = (0, combi_1.seq)("TO", expressions_1.Target);
8850
- const then = (0, combi_1.seq)("THEN", expressions_1.FieldSub, "UNTIL", expressions_1.FieldSub, "GIVING", expressions_1.FieldSub);
8979
+ const accordingTo = (0, combi_1.seq)("ACCORDING TO", expressions_1.FieldSub);
8980
+ const giving = (0, combi_1.seq)("GIVING", expressions_1.FieldSub, (0, combi_1.opt)(accordingTo));
8981
+ const then = (0, combi_1.seq)("THEN", expressions_1.FieldSub, "UNTIL", expressions_1.FieldSub, (0, combi_1.alt)(giving, to));
8851
8982
  const ret = (0, combi_1.seq)("ADD", expressions_1.Source, (0, combi_1.altPrio)(to, then));
8852
8983
  return ret;
8853
8984
  }
@@ -9004,7 +9135,10 @@ const expressions_1 = __webpack_require__(/*! ../expressions */ "./node_modules/
9004
9135
  const version_1 = __webpack_require__(/*! ../../../version */ "./node_modules/@abaplint/core/build/src/version.js");
9005
9136
  class AssignLocalCopy {
9006
9137
  getMatcher() {
9007
- const ret = (0, combi_1.seq)("ASSIGN LOCAL COPY OF", (0, combi_1.opt)((0, combi_1.seq)("INITIAL", (0, combi_1.opt)("LINE OF"))), (0, combi_1.alt)(expressions_1.Source, expressions_1.Dynamic), "TO", expressions_1.TargetFieldSymbol);
9138
+ const init = (0, combi_1.seq)("INITIAL", (0, combi_1.alt)(expressions_1.Source, expressions_1.Dynamic));
9139
+ const iline = (0, combi_1.seq)("INITIAL LINE OF", (0, combi_1.alt)(expressions_1.Source, expressions_1.Dynamic));
9140
+ const main = (0, combi_1.seq)("MAIN TABLE FIELD", expressions_1.Dynamic);
9141
+ const ret = (0, combi_1.seq)("ASSIGN LOCAL COPY OF", (0, combi_1.alt)(init, iline, main, expressions_1.Source), "TO", expressions_1.TargetFieldSymbol);
9008
9142
  return (0, combi_1.verNot)(version_1.Version.Cloud, ret);
9009
9143
  }
9010
9144
  }
@@ -9104,6 +9238,28 @@ exports.AtLineSelection = AtLineSelection;
9104
9238
 
9105
9239
  /***/ }),
9106
9240
 
9241
+ /***/ "./node_modules/@abaplint/core/build/src/abap/2_statements/statements/at_pf.js":
9242
+ /*!*************************************************************************************!*\
9243
+ !*** ./node_modules/@abaplint/core/build/src/abap/2_statements/statements/at_pf.js ***!
9244
+ \*************************************************************************************/
9245
+ /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
9246
+
9247
+ "use strict";
9248
+
9249
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
9250
+ exports.AtPF = void 0;
9251
+ const combi_1 = __webpack_require__(/*! ../combi */ "./node_modules/@abaplint/core/build/src/abap/2_statements/combi.js");
9252
+ const version_1 = __webpack_require__(/*! ../../../version */ "./node_modules/@abaplint/core/build/src/version.js");
9253
+ class AtPF {
9254
+ getMatcher() {
9255
+ return (0, combi_1.verNot)(version_1.Version.Cloud, (0, combi_1.seq)("AT", (0, combi_1.regex)(/^PF\d\d?$/i)));
9256
+ }
9257
+ }
9258
+ exports.AtPF = AtPF;
9259
+ //# sourceMappingURL=at_pf.js.map
9260
+
9261
+ /***/ }),
9262
+
9107
9263
  /***/ "./node_modules/@abaplint/core/build/src/abap/2_statements/statements/at_selection_screen.js":
9108
9264
  /*!***************************************************************************************************!*\
9109
9265
  !*** ./node_modules/@abaplint/core/build/src/abap/2_statements/statements/at_selection_screen.js ***!
@@ -9221,7 +9377,8 @@ const version_1 = __webpack_require__(/*! ../../../version */ "./node_modules/@a
9221
9377
  class Break {
9222
9378
  getMatcher() {
9223
9379
  const next = (0, combi_1.str)("AT NEXT APPLICATION STATEMENT");
9224
- const ret = (0, combi_1.altPrio)((0, combi_1.seq)("BREAK-POINT", (0, combi_1.optPrio)((0, combi_1.altPrio)(next, expressions_1.Source))), (0, combi_1.seq)("BREAK", expressions_1.FieldSub));
9380
+ // note BREAK is a special macro that wraps the parameter in a char
9381
+ const ret = (0, combi_1.altPrio)((0, combi_1.seq)("BREAK-POINT", (0, combi_1.optPrio)((0, combi_1.altPrio)(next, expressions_1.Source))), (0, combi_1.seq)("BREAK", (0, combi_1.starPrio)((0, combi_1.regex)(/.*/))));
9225
9382
  return (0, combi_1.verNot)(version_1.Version.Cloud, ret);
9226
9383
  }
9227
9384
  }
@@ -9350,7 +9507,7 @@ class CallDialog {
9350
9507
  const exporting = (0, combi_1.seq)("EXPORTING", (0, combi_1.plus)(from));
9351
9508
  const to = (0, combi_1.seq)(expressions_1.Field, (0, combi_1.optPrio)((0, combi_1.seq)("TO", expressions_1.Field)));
9352
9509
  const importing = (0, combi_1.seq)("IMPORTING", (0, combi_1.plus)(to));
9353
- const ret = (0, combi_1.seq)("CALL DIALOG", expressions_1.Constant, (0, combi_1.opt)(exporting), (0, combi_1.opt)(importing));
9510
+ const ret = (0, combi_1.seq)("CALL DIALOG", (0, combi_1.alt)(expressions_1.Constant, expressions_1.FieldSub), (0, combi_1.opt)(exporting), (0, combi_1.opt)(importing));
9354
9511
  return (0, combi_1.verNot)(version_1.Version.Cloud, ret);
9355
9512
  }
9356
9513
  }
@@ -9383,7 +9540,8 @@ class CallFunction {
9383
9540
  const separate = (0, combi_1.str)("AS SEPARATE UNIT");
9384
9541
  const keeping = (0, combi_1.str)("KEEPING LOGICAL UNIT OF WORK");
9385
9542
  const options = (0, combi_1.per)(starting, update, background, expressions_1.Destination, calling, performing, separate, keeping);
9386
- const dynamic = (0, combi_1.seq)("PARAMETER-TABLE", expressions_1.Source, (0, combi_1.opt)((0, combi_1.seq)("EXCEPTION-TABLE", expressions_1.Source)));
9543
+ const ex = (0, combi_1.seq)("EXCEPTION-TABLE", expressions_1.Source);
9544
+ const dynamic = (0, combi_1.alt)((0, combi_1.seq)("PARAMETER-TABLE", expressions_1.Source, (0, combi_1.opt)(ex)), ex);
9387
9545
  const call = (0, combi_1.seq)("CALL", (0, combi_1.altPrio)("FUNCTION", (0, combi_1.verNot)(version_1.Version.Cloud, "CUSTOMER-FUNCTION")), expressions_1.FunctionName, (0, combi_1.opt)(options), (0, combi_1.alt)(expressions_1.FunctionParameters, dynamic));
9388
9546
  return call;
9389
9547
  }
@@ -9659,7 +9817,7 @@ const combi_1 = __webpack_require__(/*! ../combi */ "./node_modules/@abaplint/co
9659
9817
  const expressions_1 = __webpack_require__(/*! ../expressions */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js");
9660
9818
  class Check {
9661
9819
  getMatcher() {
9662
- const ret = (0, combi_1.seq)("CHECK", (0, combi_1.altPrio)(expressions_1.Cond, expressions_1.Field));
9820
+ const ret = (0, combi_1.seq)("CHECK", (0, combi_1.altPrio)(expressions_1.Cond, expressions_1.FieldSub));
9663
9821
  return ret;
9664
9822
  }
9665
9823
  }
@@ -10036,7 +10194,10 @@ const expressions_1 = __webpack_require__(/*! ../expressions */ "./node_modules/
10036
10194
  const version_1 = __webpack_require__(/*! ../../../version */ "./node_modules/@abaplint/core/build/src/version.js");
10037
10195
  class CommitEntities {
10038
10196
  getMatcher() {
10039
- const s = (0, combi_1.seq)("COMMIT ENTITIES", (0, combi_1.optPrio)("IN SIMULATION MODE"), (0, combi_1.star)((0, combi_1.seq)("RESPONSE OF", expressions_1.NamespaceSimpleName, "FAILED", expressions_1.Target, "REPORTED", expressions_1.Target)));
10197
+ const failed = (0, combi_1.seq)("FAILED", expressions_1.Target);
10198
+ const reported = (0, combi_1.seq)("REPORTED", expressions_1.Target);
10199
+ const responses = (0, combi_1.seq)("RESPONSES", failed, reported);
10200
+ const s = (0, combi_1.seq)("COMMIT ENTITIES", (0, combi_1.optPrio)("IN SIMULATION MODE"), (0, combi_1.opt)(responses), (0, combi_1.opt)((0, combi_1.seq)("RESPONSE OF", expressions_1.NamespaceSimpleName, failed, reported)));
10040
10201
  return (0, combi_1.ver)(version_1.Version.v754, s);
10041
10202
  }
10042
10203
  }
@@ -10475,7 +10636,8 @@ const expressions_1 = __webpack_require__(/*! ../expressions */ "./node_modules/
10475
10636
  class DataBegin {
10476
10637
  getMatcher() {
10477
10638
  const occurs = (0, combi_1.seq)("OCCURS", expressions_1.Integer);
10478
- const structure = (0, combi_1.seq)("BEGIN OF", (0, combi_1.opt)("COMMON PART"), expressions_1.DefinitionName, (0, combi_1.opt)("READ-ONLY"), (0, combi_1.opt)(occurs));
10639
+ const common = (0, combi_1.altPrio)((0, combi_1.seq)("COMMON PART", expressions_1.DefinitionName), "COMMON PART");
10640
+ const structure = (0, combi_1.seq)("BEGIN OF", (0, combi_1.altPrio)(common, (0, combi_1.seq)(expressions_1.DefinitionName, (0, combi_1.opt)("READ-ONLY"), (0, combi_1.opt)(occurs))));
10479
10641
  return (0, combi_1.seq)("DATA", structure);
10480
10642
  }
10481
10643
  }
@@ -10686,7 +10848,7 @@ class DeleteMemory {
10686
10848
  const memory = (0, combi_1.seq)("MEMORY ID", expressions_1.Source);
10687
10849
  const id = (0, combi_1.seq)("ID", expressions_1.Source);
10688
10850
  const client = (0, combi_1.seq)("CLIENT", expressions_1.Source);
10689
- const shared = (0, combi_1.seq)("SHARED MEMORY", expressions_1.Field, "(", expressions_1.Field, ")", (0, combi_1.optPrio)(client), id);
10851
+ const shared = (0, combi_1.seq)("SHARED", (0, combi_1.altPrio)("MEMORY", "BUFFER"), expressions_1.Field, "(", expressions_1.Field, ")", (0, combi_1.optPrio)(client), id);
10690
10852
  const ret = (0, combi_1.seq)("DELETE FROM", (0, combi_1.alt)(memory, shared));
10691
10853
  return (0, combi_1.verNot)(version_1.Version.Cloud, ret);
10692
10854
  }
@@ -10794,15 +10956,17 @@ class Describe {
10794
10956
  const table = (0, combi_1.seq)("TABLE", expressions_1.FieldChain, (0, combi_1.opt)((0, combi_1.per)(tlines, kind, occurs)));
10795
10957
  const mode = (0, combi_1.seq)("IN", (0, combi_1.alt)("BYTE", "CHARACTER"), "MODE");
10796
10958
  const field = (0, combi_1.seq)("FIELD", expressions_1.Source, (0, combi_1.per)((0, combi_1.seq)("TYPE", expressions_1.Target), (0, combi_1.seq)("COMPONENTS", expressions_1.Target), (0, combi_1.seq)("LENGTH", expressions_1.Target, (0, combi_1.opt)(mode)), (0, combi_1.seq)("DECIMALS", expressions_1.Target), (0, combi_1.seq)("HELP-ID", expressions_1.Target), (0, combi_1.seq)("OUTPUT-LENGTH", expressions_1.Target), (0, combi_1.seq)("EDIT MASK", expressions_1.Target), (0, combi_1.seq)("INTO", expressions_1.Target)));
10797
- const distance = (0, combi_1.seq)("DISTANCE BETWEEN", expressions_1.Source, "AND", expressions_1.Source, "INTO", expressions_1.Target, mode);
10959
+ const distance = (0, combi_1.seq)("DISTANCE BETWEEN", expressions_1.Source, "AND", expressions_1.Source, "INTO", expressions_1.Target, (0, combi_1.opt)(mode));
10798
10960
  const lines = (0, combi_1.seq)("NUMBER OF LINES", expressions_1.Target);
10961
+ const pages = (0, combi_1.seq)("NUMBER OF PAGES", expressions_1.Target);
10799
10962
  const line = (0, combi_1.seq)("LINE", expressions_1.Source);
10800
10963
  const page = (0, combi_1.seq)("PAGE", expressions_1.Source);
10801
10964
  const index = (0, combi_1.seq)("INDEX", expressions_1.Source);
10802
10965
  const top = (0, combi_1.seq)("TOP-LINES", expressions_1.Target);
10803
10966
  const lineSize = (0, combi_1.seq)("LINE-SIZE", expressions_1.Target);
10967
+ const lineCount = (0, combi_1.seq)("LINE-COUNT", expressions_1.Target);
10804
10968
  const first = (0, combi_1.seq)("FIRST-LINE", expressions_1.Target);
10805
- const list = (0, combi_1.seq)("LIST", (0, combi_1.per)(lines, index, line, page, top, first, lineSize));
10969
+ const list = (0, combi_1.seq)("LIST", (0, combi_1.per)(lines, pages, index, line, page, top, first, lineSize, lineCount));
10806
10970
  const ret = (0, combi_1.seq)("DESCRIBE", (0, combi_1.altPrio)(table, field, distance, list));
10807
10971
  return (0, combi_1.verNot)(version_1.Version.Cloud, ret);
10808
10972
  }
@@ -11684,7 +11848,7 @@ class Export {
11684
11848
  const database = (0, combi_1.seq)("DATABASE", cluster, (0, combi_1.per)(from, client, id, using));
11685
11849
  const target = (0, combi_1.alt)(buffer, memory, database, table, shared);
11686
11850
  const left = (0, combi_1.alt)(expressions_1.FieldSub, expressions_1.FieldSymbol);
11687
- const source = (0, combi_1.alt)((0, combi_1.plus)((0, combi_1.altPrio)(expressions_1.ParameterS, (0, combi_1.seq)(left, from), left)), expressions_1.Dynamic);
11851
+ const source = (0, combi_1.alt)((0, combi_1.plus)((0, combi_1.altPrio)(expressions_1.ParameterS, (0, combi_1.seq)(left, from), left)), expressions_1.Dynamic, expressions_1.Constant);
11688
11852
  const compression = (0, combi_1.seq)("COMPRESSION", (0, combi_1.alt)("ON", "OFF"));
11689
11853
  const hint = (0, combi_1.seq)("CODE PAGE HINT", expressions_1.Source);
11690
11854
  return (0, combi_1.seq)("EXPORT", source, "TO", target, (0, combi_1.opt)(compression), (0, combi_1.opt)(hint));
@@ -11931,7 +12095,7 @@ class Format {
11931
12095
  getMatcher() {
11932
12096
  const eq = (0, combi_1.seq)("=", expressions_1.Source);
11933
12097
  const value = (0, combi_1.altPrio)(eq, "ON", "OFF");
11934
- const options = (0, combi_1.per)("RESET", (0, combi_1.seq)("INTENSIFIED", (0, combi_1.opt)(value)), (0, combi_1.seq)("INVERSE", (0, combi_1.opt)(value)), (0, combi_1.seq)("HOTSPOT", (0, combi_1.opt)(value)), (0, combi_1.seq)("FRAMES", value), (0, combi_1.seq)("INPUT", value), expressions_1.Color);
12098
+ const options = (0, combi_1.per)("RESET", (0, combi_1.seq)("INTENSIFIED", (0, combi_1.opt)(value)), (0, combi_1.seq)("INVERSE", (0, combi_1.opt)(value)), (0, combi_1.seq)("HOTSPOT", (0, combi_1.opt)(value)), (0, combi_1.seq)("FRAMES", value), (0, combi_1.seq)("INPUT", (0, combi_1.opt)(value)), expressions_1.Color);
11935
12099
  const ret = (0, combi_1.seq)("FORMAT", options);
11936
12100
  return (0, combi_1.verNot)(version_1.Version.Cloud, ret);
11937
12101
  }
@@ -12051,7 +12215,7 @@ class FunctionPool {
12051
12215
  const message = (0, combi_1.seq)("MESSAGE-ID", expressions_1.MessageClass);
12052
12216
  const line = (0, combi_1.seq)("LINE-SIZE", expressions_1.Integer);
12053
12217
  const no = (0, combi_1.str)("NO STANDARD PAGE HEADING");
12054
- return (0, combi_1.seq)("FUNCTION-POOL", expressions_1.Field, (0, combi_1.opt)((0, combi_1.per)(message, line, no)));
12218
+ return (0, combi_1.seq)("FUNCTION-POOL", expressions_1.IncludeName, (0, combi_1.opt)((0, combi_1.per)(message, line, no)));
12055
12219
  }
12056
12220
  }
12057
12221
  exports.FunctionPool = FunctionPool;
@@ -12351,7 +12515,9 @@ const expressions_1 = __webpack_require__(/*! ../expressions */ "./node_modules/
12351
12515
  const version_1 = __webpack_require__(/*! ../../../version */ "./node_modules/@abaplint/core/build/src/version.js");
12352
12516
  class GetPermissions {
12353
12517
  getMatcher() {
12354
- const s = (0, combi_1.seq)("GET PERMISSIONS ONLY GLOBAL AUTHORIZATION ENTITY", expressions_1.SimpleName, "REQUEST", expressions_1.Source, "RESULT", expressions_1.Target, "FAILED", expressions_1.Target, "REPORTED", expressions_1.Target);
12518
+ const type = (0, combi_1.altPrio)("GLOBAL AUTHORIZATION", "INSTANCE");
12519
+ const from = (0, combi_1.seq)("FROM", expressions_1.Source);
12520
+ const s = (0, combi_1.seq)("GET PERMISSIONS ONLY", type, "ENTITY", expressions_1.SimpleName, (0, combi_1.optPrio)(from), "REQUEST", expressions_1.Source, "RESULT", expressions_1.Target, "FAILED", expressions_1.Target, "REPORTED", expressions_1.Target);
12355
12521
  return (0, combi_1.ver)(version_1.Version.v754, s);
12356
12522
  }
12357
12523
  }
@@ -12547,7 +12713,7 @@ class Import {
12547
12713
  const using = (0, combi_1.seq)("USING", expressions_1.Source);
12548
12714
  const cluster = (0, combi_1.seq)(expressions_1.NamespaceSimpleName, (0, combi_1.tok)(tokens_1.ParenLeft), (0, combi_1.regex)(/^[\w$%\^]{2}$/), (0, combi_1.tok)(tokens_1.ParenRightW));
12549
12715
  const buffer = (0, combi_1.seq)("DATA BUFFER", expressions_1.Source);
12550
- const memory = (0, combi_1.seq)("MEMORY ID", expressions_1.Source);
12716
+ const memory = (0, combi_1.seq)("MEMORY", (0, combi_1.opt)((0, combi_1.seq)("ID", expressions_1.Source)));
12551
12717
  const table = (0, combi_1.seq)("INTERNAL TABLE", expressions_1.Source);
12552
12718
  const shared = (0, combi_1.seq)((0, combi_1.alt)("SHARED MEMORY", "SHARED BUFFER"), cluster, (0, combi_1.per)(dto, client, id));
12553
12719
  const database = (0, combi_1.seq)("DATABASE", cluster, (0, combi_1.per)(dto, client, id, using));
@@ -12876,6 +13042,7 @@ __exportStar(__webpack_require__(/*! ./export */ "./node_modules/@abaplint/core/
12876
13042
  __exportStar(__webpack_require__(/*! ./import */ "./node_modules/@abaplint/core/build/src/abap/2_statements/statements/import.js"), exports);
12877
13043
  __exportStar(__webpack_require__(/*! ./at_first */ "./node_modules/@abaplint/core/build/src/abap/2_statements/statements/at_first.js"), exports);
12878
13044
  __exportStar(__webpack_require__(/*! ./at_last */ "./node_modules/@abaplint/core/build/src/abap/2_statements/statements/at_last.js"), exports);
13045
+ __exportStar(__webpack_require__(/*! ./at_pf */ "./node_modules/@abaplint/core/build/src/abap/2_statements/statements/at_pf.js"), exports);
12879
13046
  __exportStar(__webpack_require__(/*! ./at */ "./node_modules/@abaplint/core/build/src/abap/2_statements/statements/at.js"), exports);
12880
13047
  __exportStar(__webpack_require__(/*! ./put */ "./node_modules/@abaplint/core/build/src/abap/2_statements/statements/put.js"), exports);
12881
13048
  __exportStar(__webpack_require__(/*! ./endat */ "./node_modules/@abaplint/core/build/src/abap/2_statements/statements/endat.js"), exports);
@@ -13011,8 +13178,10 @@ const version_1 = __webpack_require__(/*! ../../../version */ "./node_modules/@a
13011
13178
  class Infotypes {
13012
13179
  getMatcher() {
13013
13180
  const occurs = (0, combi_1.seq)("OCCURS", expressions_1.Constant);
13014
- const name = (0, combi_1.seq)("NAME", expressions_1.Field);
13015
- const ret = (0, combi_1.seq)("INFOTYPES", expressions_1.Constant, (0, combi_1.optPrio)(occurs), (0, combi_1.optPrio)(name));
13181
+ const name = (0, combi_1.seq)("NAME", expressions_1.FieldSub);
13182
+ const mode = "MODE N";
13183
+ const valid = (0, combi_1.seq)("VALID FROM", expressions_1.Source, "TO", expressions_1.Source);
13184
+ const ret = (0, combi_1.seq)("INFOTYPES", (0, combi_1.regex)(/^\d\d\d\d$/), (0, combi_1.optPrio)(valid), (0, combi_1.optPrio)(name), (0, combi_1.optPrio)(occurs), (0, combi_1.optPrio)(mode));
13016
13185
  return (0, combi_1.verNot)(version_1.Version.Cloud, ret);
13017
13186
  }
13018
13187
  }
@@ -13514,17 +13683,19 @@ class MethodDef {
13514
13683
  const parameters = (0, combi_1.seq)((0, combi_1.optPrio)((0, combi_1.altPrio)("FINAL", def, expressions_1.Abstract)), (0, combi_1.optPrio)(expressions_1.MethodDefImporting), (0, combi_1.optPrio)(expressions_1.MethodDefExporting), (0, combi_1.optPrio)(expressions_1.MethodDefChanging), (0, combi_1.optPrio)(expressions_1.MethodDefReturning), (0, combi_1.optPrio)((0, combi_1.altPrio)(expressions_1.MethodDefRaising, expressions_1.MethodDefExceptions)));
13515
13684
  const testing = (0, combi_1.seq)((0, combi_1.optPrio)(expressions_1.Abstract), "FOR TESTING", (0, combi_1.optPrio)((0, combi_1.altPrio)(expressions_1.MethodDefRaising, expressions_1.MethodDefExceptions)));
13516
13685
  // todo, this is only from version something
13517
- const tableFunction = (0, combi_1.seq)("TABLE FUNCTION", (0, combi_1.regex)(/^\w+?$/));
13686
+ const tableFunction = (0, combi_1.seq)("TABLE FUNCTION", expressions_1.NamespaceSimpleName);
13518
13687
  // todo, this is only from version something
13519
13688
  const ddl = "DDL OBJECT OPTIONS CDS SESSION CLIENT REQUIRED";
13520
13689
  const result = (0, combi_1.seq)("RESULT", expressions_1.MethodParamName);
13521
13690
  const link = (0, combi_1.seq)("LINK", expressions_1.MethodParamName);
13522
13691
  const full = (0, combi_1.seq)("FULL", expressions_1.MethodParamName);
13523
13692
  const modify = (0, combi_1.alt)((0, combi_1.seq)("FOR ACTION", expressions_1.TypeName, (0, combi_1.optPrio)(result)), (0, combi_1.seq)("FOR CREATE", (0, combi_1.alt)(expressions_1.TypeName, expressions_1.EntityAssociation)), (0, combi_1.seq)("FOR DELETE", expressions_1.TypeName), (0, combi_1.seq)("FOR UPDATE", expressions_1.TypeName));
13524
- const behavior = (0, combi_1.altPrio)((0, combi_1.seq)("VALIDATE ON SAVE IMPORTING", expressions_1.MethodParamName, "FOR", expressions_1.TypeName), (0, combi_1.seq)("MODIFY IMPORTING", expressions_1.MethodParamName, modify), (0, combi_1.seq)("READ IMPORTING", expressions_1.MethodParamName, "FOR READ", (0, combi_1.alt)(expressions_1.TypeName, expressions_1.EntityAssociation), (0, combi_1.optPrio)(full), result, (0, combi_1.optPrio)(link)), (0, combi_1.seq)("FEATURES IMPORTING", expressions_1.MethodParamName, "REQUEST", expressions_1.NamespaceSimpleName, "FOR", expressions_1.NamespaceSimpleName, result), (0, combi_1.seq)("BEHAVIOR IMPORTING", expressions_1.MethodParamName, "FOR CREATE", expressions_1.TypeName, expressions_1.MethodParamName, "FOR UPDATE", expressions_1.TypeName, expressions_1.MethodParamName, "FOR DELETE", expressions_1.TypeName), (0, combi_1.seq)("BEHAVIOR IMPORTING", expressions_1.MethodParamName, "FOR READ", expressions_1.TypeName, result), (0, combi_1.seq)((0, combi_1.alt)("BEHAVIOR", "LOCK"), "IMPORTING", expressions_1.MethodParamName, "FOR LOCK", expressions_1.TypeName), (0, combi_1.seq)("DETERMINE", (0, combi_1.alt)("ON MODIFY", "ON SAVE"), "IMPORTING", expressions_1.MethodParamName, "FOR", expressions_1.TypeName), (0, combi_1.seq)("GLOBAL AUTHORIZATION IMPORTING REQUEST", expressions_1.MethodParamName, "FOR", expressions_1.TypeName, result), (0, combi_1.seq)("INSTANCE AUTHORIZATION IMPORTING", expressions_1.MethodParamName, "REQUEST", expressions_1.MethodParamName, "FOR", expressions_1.TypeName, result));
13693
+ const forRead = (0, combi_1.seq)("FOR READ", (0, combi_1.alt)(expressions_1.TypeName, expressions_1.EntityAssociation), (0, combi_1.optPrio)(full), result, (0, combi_1.optPrio)(link));
13694
+ const forfunction = (0, combi_1.seq)("FOR FUNCTION", expressions_1.TypeName, result);
13695
+ const behavior = (0, combi_1.altPrio)((0, combi_1.seq)("VALIDATE ON SAVE IMPORTING", expressions_1.MethodParamName, "FOR", expressions_1.TypeName), (0, combi_1.seq)("MODIFY IMPORTING", expressions_1.MethodParamName, modify), (0, combi_1.seq)("READ IMPORTING", expressions_1.MethodParamName, (0, combi_1.altPrio)(forRead, forfunction)), (0, combi_1.seq)("FEATURES IMPORTING", expressions_1.MethodParamName, "REQUEST", expressions_1.NamespaceSimpleName, "FOR", expressions_1.NamespaceSimpleName, result), (0, combi_1.seq)("BEHAVIOR IMPORTING", expressions_1.MethodParamName, "FOR CREATE", expressions_1.TypeName, expressions_1.MethodParamName, "FOR UPDATE", expressions_1.TypeName, expressions_1.MethodParamName, "FOR DELETE", expressions_1.TypeName), (0, combi_1.seq)("BEHAVIOR IMPORTING", expressions_1.MethodParamName, "FOR READ", expressions_1.TypeName, result), (0, combi_1.seq)((0, combi_1.alt)("BEHAVIOR", "LOCK"), "IMPORTING", expressions_1.MethodParamName, "FOR LOCK", expressions_1.TypeName), (0, combi_1.seq)("DETERMINE", (0, combi_1.alt)("ON MODIFY", "ON SAVE"), "IMPORTING", expressions_1.MethodParamName, "FOR", expressions_1.TypeName), (0, combi_1.seq)("GLOBAL AUTHORIZATION IMPORTING REQUEST", expressions_1.MethodParamName, "FOR", expressions_1.TypeName, result), (0, combi_1.seq)("INSTANCE AUTHORIZATION IMPORTING", expressions_1.MethodParamName, "REQUEST", expressions_1.MethodParamName, "FOR", expressions_1.TypeName, result), (0, combi_1.seq)("INSTANCE FEATURES IMPORTING", expressions_1.MethodParamName, "REQUEST", expressions_1.MethodParamName, "FOR", expressions_1.TypeName, result));
13525
13696
  // todo, this is only from version something
13526
13697
  const amdp = (0, combi_1.seq)("AMDP OPTIONS CDS SESSION CLIENT CURRENT", (0, combi_1.optPrio)(expressions_1.MethodDefImporting), (0, combi_1.optPrio)(expressions_1.MethodDefExporting), (0, combi_1.optPrio)(expressions_1.MethodDefRaising));
13527
- const ret = (0, combi_1.seq)((0, combi_1.altPrio)("CLASS-METHODS", "METHODS"), expressions_1.MethodName, (0, combi_1.alt)((0, combi_1.seq)((0, combi_1.optPrio)(expressions_1.Abstract), expressions_1.EventHandler), parameters, testing, (0, combi_1.seq)("FOR", (0, combi_1.alt)(tableFunction, ddl, behavior)), amdp, "NOT AT END OF MODE", (0, combi_1.optPrio)(expressions_1.Redefinition)));
13698
+ const ret = (0, combi_1.seq)((0, combi_1.altPrio)("CLASS-METHODS", "METHODS"), expressions_1.MethodName, (0, combi_1.alt)((0, combi_1.seq)((0, combi_1.optPrio)(expressions_1.Abstract), (0, combi_1.optPrio)(def), expressions_1.EventHandler), parameters, testing, (0, combi_1.seq)("FOR", (0, combi_1.alt)(tableFunction, ddl, behavior)), amdp, "NOT AT END OF MODE", (0, combi_1.optPrio)(expressions_1.Redefinition)));
13528
13699
  return ret;
13529
13700
  }
13530
13701
  }
@@ -13601,8 +13772,15 @@ class ModifyEntities {
13601
13772
  getMatcher() {
13602
13773
  const fieldsWith = (0, combi_1.seq)("FIELDS (", (0, combi_1.plus)(expressions_1.SimpleName), ") WITH", expressions_1.Source);
13603
13774
  const operation = (0, combi_1.alt)((0, combi_1.seq)("UPDATE SET FIELDS WITH", expressions_1.Source), (0, combi_1.seq)("CREATE SET FIELDS WITH", expressions_1.Source), (0, combi_1.seq)("UPDATE", fieldsWith), (0, combi_1.seq)("DELETE FROM", expressions_1.Source), (0, combi_1.seq)("EXECUTE", expressions_1.SimpleName, "FROM", expressions_1.Source), (0, combi_1.seq)("CREATE", (0, combi_1.optPrio)("AUTO FILL CID"), fieldsWith));
13604
- const s = (0, combi_1.seq)("MODIFY ENTITIES OF", expressions_1.NamespaceSimpleName, (0, combi_1.opt)("IN LOCAL MODE"), "ENTITY", expressions_1.SimpleName, operation, (0, combi_1.per)((0, combi_1.seq)("FAILED", expressions_1.Target), (0, combi_1.seq)("RESULT", expressions_1.Target), (0, combi_1.seq)("MAPPED", expressions_1.Target), (0, combi_1.seq)("REPORTED", expressions_1.Target)));
13605
- return (0, combi_1.ver)(version_1.Version.v754, s);
13775
+ const failed = (0, combi_1.seq)("FAILED", expressions_1.Target);
13776
+ const result = (0, combi_1.seq)("RESULT", expressions_1.Target);
13777
+ const mapped = (0, combi_1.seq)("MAPPED", expressions_1.Target);
13778
+ const reported = (0, combi_1.seq)("REPORTED", expressions_1.Target);
13779
+ const from = (0, combi_1.seq)("FROM", expressions_1.Source);
13780
+ const execute = (0, combi_1.seq)("EXECUTE", expressions_1.NamespaceSimpleName);
13781
+ const entities = (0, combi_1.seq)("ENTITIES OF", expressions_1.NamespaceSimpleName, (0, combi_1.opt)("IN LOCAL MODE"), (0, combi_1.plusPrio)((0, combi_1.seq)("ENTITY", expressions_1.SimpleName, operation)), (0, combi_1.optPrio)((0, combi_1.per)(failed, result, mapped, reported)));
13782
+ const entity = (0, combi_1.seq)("ENTITY", expressions_1.NamespaceSimpleName, execute, from, mapped, failed, reported);
13783
+ return (0, combi_1.ver)(version_1.Version.v754, (0, combi_1.seq)("MODIFY", (0, combi_1.alt)(entities, entity)));
13606
13784
  }
13607
13785
  }
13608
13786
  exports.ModifyEntities = ModifyEntities;
@@ -13658,7 +13836,9 @@ const expressions_1 = __webpack_require__(/*! ../expressions */ "./node_modules/
13658
13836
  const version_1 = __webpack_require__(/*! ../../../version */ "./node_modules/@abaplint/core/build/src/version.js");
13659
13837
  class ModifyLine {
13660
13838
  getMatcher() {
13661
- const form = (0, combi_1.seq)((0, combi_1.alt)("INVERSE", "INPUT"), "=", expressions_1.Source);
13839
+ const onOff = (0, combi_1.alt)("ON", "OFF");
13840
+ const eq = (0, combi_1.seq)("=", expressions_1.Source);
13841
+ const form = (0, combi_1.seq)((0, combi_1.alt)("INVERSE", "INPUT", "COLOR"), (0, combi_1.alt)(eq, onOff));
13662
13842
  const from = (0, combi_1.seq)("FROM", expressions_1.Source);
13663
13843
  const value = (0, combi_1.seq)("FIELD VALUE", (0, combi_1.plus)((0, combi_1.seq)(expressions_1.Source, (0, combi_1.optPrio)(from))));
13664
13844
  const format = (0, combi_1.seq)("FIELD FORMAT", expressions_1.Source, (0, combi_1.opt)(form));
@@ -13666,8 +13846,7 @@ class ModifyLine {
13666
13846
  const index = (0, combi_1.seq)("INDEX", expressions_1.Source);
13667
13847
  const page = (0, combi_1.seq)("OF PAGE", expressions_1.Source);
13668
13848
  const ocp = (0, combi_1.str)("OF CURRENT PAGE");
13669
- const lineFormat = (0, combi_1.seq)("LINE FORMAT", (0, combi_1.alt)("INPUT OFF", "INVERSE", "RESET", "INTENSIFIED"));
13670
- const onOff = (0, combi_1.alt)("ON", "OFF");
13849
+ const lineFormat = (0, combi_1.seq)("LINE FORMAT", (0, combi_1.per)("INPUT OFF", "INVERSE", "RESET", "INTENSIFIED", expressions_1.Color));
13671
13850
  const intensified = (0, combi_1.seq)("INTENSIFIED", onOff);
13672
13851
  const options = (0, combi_1.per)(index, value, format, page, lineFormat, lineValue, ocp, intensified, expressions_1.Color);
13673
13852
  const ret = (0, combi_1.seq)("MODIFY", (0, combi_1.altPrio)("CURRENT LINE", (0, combi_1.seq)("LINE", expressions_1.Source)), (0, combi_1.opt)(options));
@@ -13744,7 +13923,7 @@ const tokens_1 = __webpack_require__(/*! ../../1_lexer/tokens */ "./node_modules
13744
13923
  class Move {
13745
13924
  getMatcher() {
13746
13925
  const mov = (0, combi_1.verNot)(version_1.Version.Cloud, "MOVE");
13747
- const move = (0, combi_1.seq)(mov, (0, combi_1.altPrio)((0, combi_1.seq)("EXACT", expressions_1.Source, "TO", expressions_1.Target), (0, combi_1.seq)(expressions_1.Source, (0, combi_1.altPrio)("?TO", "TO"), expressions_1.Target)));
13926
+ const move = (0, combi_1.seq)(mov, (0, combi_1.altPrio)((0, combi_1.seq)("EXACT", expressions_1.Source, "TO", expressions_1.Target), (0, combi_1.seq)(expressions_1.Source, (0, combi_1.altPrio)("?TO", "TO"), expressions_1.Target)), (0, combi_1.opt)((0, combi_1.seq)("PERCENTAGE", expressions_1.Source, (0, combi_1.opt)((0, combi_1.alt)("LEFT", "RIGHT")))));
13748
13927
  const calcAssign = (0, combi_1.ver)(version_1.Version.v754, (0, combi_1.alt)((0, combi_1.seq)((0, combi_1.tok)(tokens_1.WPlus), "="), (0, combi_1.seq)((0, combi_1.tok)(tokens_1.WDash), "="), "/=", "*=", "&&="));
13749
13928
  const chained = (0, combi_1.seq)("=", (0, combi_1.star)((0, combi_1.seq)(expressions_1.Target, "=")));
13750
13929
  const equals = (0, combi_1.altPrio)((0, combi_1.altPrio)(chained, "?="), calcAssign);
@@ -13856,13 +14035,16 @@ class NewPage {
13856
14035
  const coverText = (0, combi_1.seq)("COVER TEXT", expressions_1.Source);
13857
14036
  const coverPage = (0, combi_1.seq)("SAP COVER PAGE", expressions_1.Source);
13858
14037
  const immediately = (0, combi_1.seq)("IMMEDIATELY", expressions_1.Source);
14038
+ const copies = (0, combi_1.seq)("COPIES", expressions_1.Source);
13859
14039
  const keep = (0, combi_1.seq)("KEEP IN SPOOL", expressions_1.Source);
13860
14040
  const layout = (0, combi_1.seq)("LAYOUT", expressions_1.Source);
13861
14041
  const listAuth = (0, combi_1.seq)("LIST AUTHORITY", expressions_1.Source);
14042
+ const department = (0, combi_1.seq)("DEPARTMENT", expressions_1.Source);
14043
+ const receiver = (0, combi_1.seq)("RECEIVER", expressions_1.Source);
13862
14044
  const dataset = (0, combi_1.seq)("LIST DATASET", expressions_1.Source);
13863
14045
  const name = (0, combi_1.seq)("LIST NAME", expressions_1.Source);
13864
14046
  const newList = (0, combi_1.seq)("NEW LIST IDENTIFICATION", expressions_1.Source);
13865
- const ret = (0, combi_1.seq)("NEW-PAGE", (0, combi_1.opt)((0, combi_1.per)(print, (0, combi_1.alt)("NO-TITLE", "WITH-TITLE"), (0, combi_1.alt)("NO-HEADING", "WITH-HEADING"), "NO DIALOG", parameters, listAuth, immediately, dataset, coverPage, newList, keep, name, layout, destination, coverText, archive, "NEW-SECTION", lineCount, line)));
14047
+ const ret = (0, combi_1.seq)("NEW-PAGE", (0, combi_1.opt)((0, combi_1.per)(print, (0, combi_1.alt)("NO-TITLE", "WITH-TITLE"), (0, combi_1.alt)("NO-HEADING", "WITH-HEADING"), "NO DIALOG", "NO-TOPOFPAGE", parameters, listAuth, immediately, dataset, coverPage, newList, keep, department, name, layout, destination, receiver, copies, coverText, archive, "NEW-SECTION", lineCount, line)));
13866
14048
  return (0, combi_1.verNot)(version_1.Version.Cloud, ret);
13867
14049
  }
13868
14050
  }
@@ -14058,8 +14240,9 @@ class Parameter {
14058
14240
  const length = (0, combi_1.seq)("LENGTH", expressions_1.Constant);
14059
14241
  const match = (0, combi_1.seq)("MATCHCODE OBJECT", expressions_1.Field);
14060
14242
  const decimals = (0, combi_1.seq)("DECIMALS", expressions_1.Source);
14061
- const perm = (0, combi_1.per)(type, def, "OBLIGATORY", match, cmd, length, decimals, radio, memory, modif, listbox, visible, "VALUE CHECK", "NO-DISPLAY", "AS CHECKBOX", "LOWER CASE");
14062
- const ret = (0, combi_1.seq)(para, expressions_1.FieldSub, (0, combi_1.opt)(expressions_1.FieldLength), (0, combi_1.opt)(perm));
14243
+ const forTable = (0, combi_1.seq)("FOR TABLE", expressions_1.DatabaseTable, (0, combi_1.opt)("VALUE-REQUEST"));
14244
+ const perm = (0, combi_1.per)(type, def, "OBLIGATORY", match, cmd, length, decimals, radio, memory, modif, listbox, visible, forTable, "VALUE CHECK", "NO-DISPLAY", "AS CHECKBOX", "LOWER CASE");
14245
+ const ret = (0, combi_1.seq)(para, expressions_1.FieldSub, (0, combi_1.opt)(expressions_1.ConstantFieldLength), (0, combi_1.opt)(perm));
14063
14246
  return (0, combi_1.verNot)(version_1.Version.Cloud, ret);
14064
14247
  }
14065
14248
  }
@@ -14141,7 +14324,13 @@ class PrintControl {
14141
14324
  getMatcher() {
14142
14325
  const index = (0, combi_1.seq)("INDEX-LINE", expressions_1.Source);
14143
14326
  const func = (0, combi_1.seq)("FUNCTION", expressions_1.Source);
14144
- const ret = (0, combi_1.seq)("PRINT-CONTROL", (0, combi_1.alt)(index, func));
14327
+ const line = (0, combi_1.seq)("LINE", expressions_1.Source);
14328
+ const position = (0, combi_1.seq)("POSITION", expressions_1.Source);
14329
+ const size = (0, combi_1.seq)("SIZE", expressions_1.Source);
14330
+ const cpi = (0, combi_1.seq)("CPI", expressions_1.Source);
14331
+ const lpi = (0, combi_1.seq)("LPI", expressions_1.Source);
14332
+ const font = (0, combi_1.seq)("FONT", expressions_1.Source);
14333
+ const ret = (0, combi_1.seq)("PRINT-CONTROL", (0, combi_1.per)(index, func, line, position, size, cpi, lpi, font));
14145
14334
  return (0, combi_1.verNot)(version_1.Version.Cloud, ret);
14146
14335
  }
14147
14336
  }
@@ -14186,12 +14375,12 @@ const expressions_1 = __webpack_require__(/*! ../expressions */ "./node_modules/
14186
14375
  const version_1 = __webpack_require__(/*! ../../../version */ "./node_modules/@abaplint/core/build/src/version.js");
14187
14376
  class Program {
14188
14377
  getMatcher() {
14189
- const message = (0, combi_1.seq)("MESSAGE-ID", expressions_1.Source);
14378
+ const message = (0, combi_1.seq)("MESSAGE-ID", expressions_1.MessageClass);
14190
14379
  const size = (0, combi_1.seq)("LINE-SIZE", expressions_1.Source);
14191
14380
  const heading = (0, combi_1.str)("NO STANDARD PAGE HEADING");
14192
- const line = (0, combi_1.seq)("LINE-COUNT", expressions_1.Source);
14381
+ const line = (0, combi_1.seq)("LINE-COUNT", expressions_1.Source, (0, combi_1.opt)(expressions_1.FieldLength));
14193
14382
  const options = (0, combi_1.per)(message, size, heading, line);
14194
- const ret = (0, combi_1.seq)("PROGRAM", (0, combi_1.optPrio)(expressions_1.ReportName), (0, combi_1.opt)(options));
14383
+ const ret = (0, combi_1.seq)("PROGRAM", (0, combi_1.opt)(expressions_1.ReportName), (0, combi_1.opt)(options));
14195
14384
  return (0, combi_1.verNot)(version_1.Version.Cloud, ret);
14196
14385
  }
14197
14386
  }
@@ -14236,10 +14425,13 @@ const expressions_1 = __webpack_require__(/*! ../expressions */ "./node_modules/
14236
14425
  const version_1 = __webpack_require__(/*! ../../../version */ "./node_modules/@abaplint/core/build/src/version.js");
14237
14426
  class Provide {
14238
14427
  getMatcher() {
14239
- const list = (0, combi_1.plus)((0, combi_1.altPrio)("*", expressions_1.Field));
14428
+ const list = (0, combi_1.plusPrio)((0, combi_1.altPrio)("*", expressions_1.ProvideFieldName));
14240
14429
  const fields = (0, combi_1.seq)("FIELDS", list, "FROM", expressions_1.Source, "INTO", expressions_1.Target, "VALID", expressions_1.Field, "BOUNDS", expressions_1.Field, "AND", expressions_1.Field);
14241
- const fieldList = (0, combi_1.altPrio)((0, combi_1.seq)(list, "FROM", expressions_1.Source), list);
14242
- const ret = (0, combi_1.seq)("PROVIDE", (0, combi_1.altPrio)((0, combi_1.plus)(fields), (0, combi_1.plus)(fieldList)), "BETWEEN", expressions_1.SimpleSource3, "AND", expressions_1.SimpleSource3);
14430
+ const from = (0, combi_1.seq)("FROM", expressions_1.Source);
14431
+ const fieldList = (0, combi_1.seq)((0, combi_1.plus)(list), from);
14432
+ const where = (0, combi_1.seq)("WHERE", expressions_1.Cond);
14433
+ const between = (0, combi_1.seq)("BETWEEN", expressions_1.SimpleSource3, "AND", expressions_1.SimpleSource3);
14434
+ const ret = (0, combi_1.seq)("PROVIDE", (0, combi_1.altPrio)((0, combi_1.plusPrio)(fields), (0, combi_1.plusPrio)(fieldList)), (0, combi_1.opt)((0, combi_1.per)(between, where)));
14243
14435
  return (0, combi_1.verNot)(version_1.Version.Cloud, ret);
14244
14436
  }
14245
14437
  }
@@ -14408,7 +14600,7 @@ const expressions_1 = __webpack_require__(/*! ../expressions */ "./node_modules/
14408
14600
  const version_1 = __webpack_require__(/*! ../../../version */ "./node_modules/@abaplint/core/build/src/version.js");
14409
14601
  class ReadDataset {
14410
14602
  getMatcher() {
14411
- const ret = (0, combi_1.seq)("READ DATASET", expressions_1.Source, "INTO", expressions_1.Target, (0, combi_1.opt)((0, combi_1.seq)("MAXIMUM LENGTH", expressions_1.Source)), (0, combi_1.opt)((0, combi_1.seq)("ACTUAL LENGTH", expressions_1.Target)), (0, combi_1.opt)((0, combi_1.seq)("LENGTH", expressions_1.Target)));
14603
+ const ret = (0, combi_1.seq)("READ DATASET", expressions_1.Source, "INTO", expressions_1.Target, (0, combi_1.opt)((0, combi_1.per)((0, combi_1.seq)("MAXIMUM LENGTH", expressions_1.Source), (0, combi_1.seq)("ACTUAL LENGTH", expressions_1.Target), (0, combi_1.seq)("LENGTH", expressions_1.Target))));
14412
14604
  return (0, combi_1.verNot)(version_1.Version.Cloud, ret);
14413
14605
  }
14414
14606
  }
@@ -14436,7 +14628,7 @@ class ReadEntities {
14436
14628
  const from = (0, combi_1.seq)("FROM", expressions_1.Source);
14437
14629
  const fields = (0, combi_1.seq)("FIELDS", (0, combi_1.tok)(tokens_1.WParenLeftW), (0, combi_1.plus)(expressions_1.SimpleName), (0, combi_1.tok)(tokens_1.WParenRightW), "WITH", expressions_1.Source);
14438
14630
  const all = (0, combi_1.seq)("ALL FIELDS WITH", expressions_1.Source);
14439
- const s = (0, combi_1.seq)("READ ENTITIES OF", expressions_1.NamespaceSimpleName, (0, combi_1.opt)("IN LOCAL MODE"), "ENTITY", expressions_1.SimpleName, (0, combi_1.opt)((0, combi_1.seq)("BY", expressions_1.AssociationName)), (0, combi_1.alt)(fields, from, all), "RESULT", expressions_1.Target, (0, combi_1.optPrio)((0, combi_1.seq)("LINK", expressions_1.Target)), (0, combi_1.optPrio)((0, combi_1.seq)("FAILED", expressions_1.Target)), (0, combi_1.optPrio)((0, combi_1.seq)("REPORTED", expressions_1.Target)));
14631
+ const s = (0, combi_1.seq)("READ ENTITIES OF", expressions_1.NamespaceSimpleName, (0, combi_1.opt)("IN LOCAL MODE"), "ENTITY", expressions_1.SimpleName, (0, combi_1.opt)((0, combi_1.seq)("BY", expressions_1.AssociationName)), (0, combi_1.alt)(fields, from, all), (0, combi_1.optPrio)((0, combi_1.seq)("RESULT", expressions_1.Target)), (0, combi_1.optPrio)((0, combi_1.seq)("LINK", expressions_1.Target)), (0, combi_1.optPrio)((0, combi_1.seq)("FAILED", expressions_1.Target)), (0, combi_1.optPrio)((0, combi_1.seq)("REPORTED", expressions_1.Target)));
14440
14632
  return (0, combi_1.ver)(version_1.Version.v754, s);
14441
14633
  }
14442
14634
  }
@@ -14524,7 +14716,7 @@ class ReadTable {
14524
14716
  const key = (0, combi_1.seq)((0, combi_1.altPrio)("WITH KEY", "WITH TABLE KEY"), (0, combi_1.alt)(expressions_1.ComponentCompareSimple, components, (0, combi_1.seq)((0, combi_1.optPrio)("="), expressions_1.Source)));
14525
14717
  const using = (0, combi_1.seq)("USING KEY", (0, combi_1.alt)(expressions_1.Field, expressions_1.Dynamic));
14526
14718
  const from = (0, combi_1.seq)("FROM", expressions_1.Source);
14527
- const perm = (0, combi_1.per)((0, combi_1.alt)(index, key, from), expressions_1.ReadTableTarget, using, comparing, "CASTING", "TRANSPORTING ALL FIELDS", (0, combi_1.seq)("TRANSPORTING", transporting_fields_1.TransportingFields), "BINARY SEARCH");
14719
+ const perm = (0, combi_1.per)((0, combi_1.alt)(index, key, from), expressions_1.ReadTableTarget, using, comparing, "CASTING", (0, combi_1.seq)("TRANSPORTING", (0, combi_1.altPrio)("ALL FIELDS", "NO FIELDS", transporting_fields_1.TransportingFields)), "BINARY SEARCH");
14528
14720
  return (0, combi_1.seq)("READ TABLE", (0, combi_1.alt)(expressions_1.SimpleSource2, (0, combi_1.ver)(version_1.Version.v740sp02, expressions_1.Source)), (0, combi_1.opt)(perm));
14529
14721
  }
14530
14722
  }
@@ -14922,7 +15114,7 @@ class ScrollList {
14922
15114
  const line = (0, combi_1.seq)("LINE", expressions_1.Source);
14923
15115
  const column = (0, combi_1.seq)("TO COLUMN", expressions_1.Source);
14924
15116
  const to = (0, combi_1.seq)("TO", (0, combi_1.alt)("FIRST PAGE", "LAST PAGE", (0, combi_1.seq)("PAGE", expressions_1.Source)));
14925
- const ret = (0, combi_1.seq)("SCROLL LIST", (0, combi_1.per)(index, (0, combi_1.alt)(to, "BACKWARD", "FORWARD"), column, line));
15117
+ const ret = (0, combi_1.seq)("SCROLL LIST", (0, combi_1.per)(index, (0, combi_1.alt)(to, "BACKWARD", "FORWARD"), (0, combi_1.alt)("LEFT", "RIGHT"), column, line));
14926
15118
  return (0, combi_1.verNot)(version_1.Version.Cloud, ret);
14927
15119
  }
14928
15120
  }
@@ -15030,7 +15222,9 @@ class SelectionScreen {
15030
15222
  const endLine = (0, combi_1.str)("END OF LINE");
15031
15223
  const modif = (0, combi_1.seq)("MODIF ID", expressions_1.Modif);
15032
15224
  const visible = (0, combi_1.seq)("VISIBLE LENGTH", (0, combi_1.regex)(/^\d+$/));
15033
- const commentOpt = (0, combi_1.per)((0, combi_1.seq)("FOR FIELD", expressions_1.Field), modif, visible);
15225
+ const ldbId = (0, combi_1.seq)("ID", (0, combi_1.regex)(/^\w+$/));
15226
+ const ldb = (0, combi_1.seq)("FOR FIELD", expressions_1.FieldSub, (0, combi_1.optPrio)(ldbId));
15227
+ const commentOpt = (0, combi_1.per)(ldb, modif, visible);
15034
15228
  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)));
15035
15229
  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));
15036
15230
  const command = (0, combi_1.seq)("USER-COMMAND", (0, combi_1.alt)(expressions_1.Field, expressions_1.Constant));
@@ -15043,13 +15237,16 @@ class SelectionScreen {
15043
15237
  const posSymbols = (0, combi_1.altPrio)("POS_LOW", "POS_HIGH");
15044
15238
  // number between 1 and 83
15045
15239
  const posIntegers = (0, combi_1.regex)(/^(0?[1-9]|[1234567][0-9]|8[0-3])$/);
15046
- const pos = (0, combi_1.seq)("POSITION", (0, combi_1.altPrio)(posIntegers, posSymbols));
15240
+ const pos = (0, combi_1.seq)("POSITION", (0, combi_1.altPrio)(posIntegers, posSymbols), (0, combi_1.opt)((0, combi_1.seq)("FOR TABLE", expressions_1.Field)));
15047
15241
  const incl = (0, combi_1.seq)("INCLUDE BLOCKS", expressions_1.BlockName);
15048
- const tabbed = (0, combi_1.seq)("BEGIN OF TABBED BLOCK", expressions_1.InlineField, "FOR", expressions_1.Integer, "LINES", (0, combi_1.optPrio)("NO INTERVALS"));
15049
- const uline = (0, combi_1.seq)("ULINE", (0, combi_1.opt)(position));
15242
+ const tabbed = (0, combi_1.seq)("BEGIN OF TABBED BLOCK", expressions_1.BlockName, "FOR", expressions_1.Integer, "LINES", (0, combi_1.optPrio)("NO INTERVALS"));
15243
+ const uline = (0, combi_1.seq)("ULINE", (0, combi_1.opt)(position), (0, combi_1.opt)(modif));
15050
15244
  const param = (0, combi_1.seq)("INCLUDE PARAMETERS", expressions_1.Field);
15051
15245
  const iso = (0, combi_1.seq)("INCLUDE SELECT-OPTIONS", expressions_1.Field);
15052
- const ret = (0, combi_1.seq)("SELECTION-SCREEN", (0, combi_1.altPrio)(comment, func, skip, pos, incl, iso, push, tab, uline, beginBlock, tabbed, endBlock, beginLine, endLine, param, beginScreen, endScreen));
15246
+ const exclude = (0, combi_1.seq)("EXCLUDE", (0, combi_1.alt)("IDS", "PARAMETERS"), (0, combi_1.regex)(/^\w+$/));
15247
+ const beginVersion = (0, combi_1.seq)("BEGIN OF VERSION", (0, combi_1.regex)(/^\w+$/), expressions_1.TextElement);
15248
+ const endVersion = (0, combi_1.seq)("END OF VERSION", (0, combi_1.regex)(/^\w+$/));
15249
+ const ret = (0, combi_1.seq)("SELECTION-SCREEN", (0, combi_1.altPrio)(comment, func, skip, pos, incl, iso, push, tab, uline, beginBlock, tabbed, endBlock, beginLine, endLine, param, beginScreen, endScreen, exclude, beginVersion, endVersion));
15053
15250
  return (0, combi_1.verNot)(version_1.Version.Cloud, ret);
15054
15251
  }
15055
15252
  }
@@ -15851,7 +16048,7 @@ class Submit {
15851
16048
  const between = (0, combi_1.seq)("BETWEEN", expressions_1.Source, "AND", expressions_1.Source);
15852
16049
  const selectionTable = (0, combi_1.seq)("WITH SELECTION-TABLE", expressions_1.Source);
15853
16050
  const awith = (0, combi_1.seq)("WITH", expressions_1.FieldSub, (0, combi_1.alt)(compare, between), (0, combi_1.optPrio)(sign));
15854
- const prog = (0, combi_1.alt)(expressions_1.NamespaceSimpleName, expressions_1.Dynamic);
16051
+ const prog = (0, combi_1.altPrio)(expressions_1.IncludeName, expressions_1.Dynamic);
15855
16052
  const job = (0, combi_1.seq)("VIA JOB", expressions_1.Source, "NUMBER", expressions_1.Source);
15856
16053
  const exporting = (0, combi_1.str)("EXPORTING LIST TO MEMORY");
15857
16054
  const spool = (0, combi_1.seq)("SPOOL PARAMETERS", expressions_1.Source);
@@ -16862,8 +17059,8 @@ class Write {
16862
17059
  const dateFormat = (0, combi_1.altPrio)("DD/MM/YY", "MM/DD/YY", "DD/MM/YYYY", "MM/DD/YYYY", "DDMMYY", "MMDDYY", "YYMMDD");
16863
17060
  const as = (0, combi_1.seq)("AS", (0, combi_1.altPrio)("LINE", "ICON", "CHECKBOX", "SYMBOL"));
16864
17061
  const to = (0, combi_1.seq)("TO", expressions_1.Target);
16865
- const options = (0, combi_1.per)(mask, to, (0, combi_1.seq)("EXPONENT", expressions_1.Source), "NO-GROUPING", "NO-ZERO", "CENTERED", (0, combi_1.seq)("INPUT", (0, combi_1.opt)(onOff)), "NO-GAP", "LEFT-JUSTIFIED", as, (0, combi_1.seq)("FRAMES", onOff), (0, combi_1.seq)("HOTSPOT", (0, combi_1.opt)(onOff)), "RIGHT-JUSTIFIED", (0, combi_1.seq)("TIME ZONE", expressions_1.Source), (0, combi_1.seq)("UNDER", expressions_1.Source), (0, combi_1.seq)("STYLE", expressions_1.Source), (0, combi_1.seq)("ROUND", expressions_1.Source), (0, combi_1.seq)("QUICKINFO", expressions_1.Source), "ENVIRONMENT TIME FORMAT", dateFormat, (0, combi_1.seq)("UNIT", expressions_1.Source), (0, combi_1.seq)("INTENSIFIED", (0, combi_1.opt)(onOff)), (0, combi_1.seq)("INDEX", expressions_1.Source), (0, combi_1.seq)("DECIMALS", expressions_1.Source), (0, combi_1.seq)("INVERSE", (0, combi_1.opt)(onOff)), expressions_1.Color, (0, combi_1.seq)("CURRENCY", expressions_1.Source), "NO-SIGN");
16866
- const ret = (0, combi_1.seq)("WRITE", (0, combi_1.alt)("AT /", (0, combi_1.seq)((0, combi_1.opt)(expressions_1.WriteOffsetLength), (0, combi_1.altPrio)(expressions_1.Source, expressions_1.Dynamic, "/"), (0, combi_1.opt)(options))));
17062
+ const options = (0, combi_1.per)(mask, to, (0, combi_1.seq)("EXPONENT", expressions_1.Source), "NO-GROUPING", "NO-ZERO", "CENTERED", (0, combi_1.seq)("INPUT", (0, combi_1.opt)(onOff)), "NO-GAP", "LEFT-JUSTIFIED", as, (0, combi_1.seq)("FRAMES", onOff), (0, combi_1.seq)("HOTSPOT", (0, combi_1.opt)(onOff)), "RIGHT-JUSTIFIED", (0, combi_1.seq)("TIME ZONE", expressions_1.Source), (0, combi_1.seq)("UNDER", expressions_1.Source), (0, combi_1.seq)("STYLE", expressions_1.Source), (0, combi_1.seq)("ROUND", expressions_1.Source), (0, combi_1.seq)("QUICKINFO", expressions_1.Source), "ENVIRONMENT TIME FORMAT", dateFormat, (0, combi_1.seq)("UNIT", expressions_1.Source), (0, combi_1.seq)("INTENSIFIED", (0, combi_1.opt)(onOff)), (0, combi_1.seq)("INDEX", expressions_1.Source), (0, combi_1.seq)("DECIMALS", expressions_1.Source), (0, combi_1.seq)("INVERSE", (0, combi_1.opt)(onOff)), expressions_1.Color, (0, combi_1.seq)("CURRENCY", expressions_1.Source), "RESET", "NO-SIGN");
17063
+ const ret = (0, combi_1.seq)("WRITE", (0, combi_1.alt)("AT /", (0, combi_1.seq)((0, combi_1.opt)(expressions_1.WriteOffsetLength), (0, combi_1.alt)(expressions_1.Source, expressions_1.Dynamic, "/"), (0, combi_1.opt)(options))));
16867
17064
  return (0, combi_1.verNot)(version_1.Version.Cloud, ret);
16868
17065
  }
16869
17066
  }
@@ -17304,7 +17501,7 @@ const Structures = __webpack_require__(/*! . */ "./node_modules/@abaplint/core/b
17304
17501
  const Statements = __webpack_require__(/*! ../../2_statements/statements */ "./node_modules/@abaplint/core/build/src/abap/2_statements/statements/index.js");
17305
17502
  class Any {
17306
17503
  getMatcher() {
17307
- return (0, _combi_1.star)((0, _combi_1.alt)((0, _combi_1.sta)(Statements.ClassLocalFriends), (0, _combi_1.sta)(Statements.ClassDeferred), (0, _combi_1.sta)(Statements.Report), (0, _combi_1.sta)(Statements.Program), (0, _combi_1.sta)(Statements.Parameter), (0, _combi_1.sta)(Statements.CheckSelectOptions), (0, _combi_1.sta)(Statements.Get), (0, _combi_1.sta)(Statements.Initialization), (0, _combi_1.sta)(Statements.InterfaceDeferred), (0, _combi_1.sta)(Statements.SelectionScreen), (0, _combi_1.sta)(Statements.SelectOption), (0, _combi_1.sta)(Statements.AtSelectionScreen), (0, _combi_1.sta)(Statements.AtLineSelection), (0, _combi_1.sta)(Statements.AtUserCommand), (0, _combi_1.sta)(Statements.StartOfSelection), (0, _combi_1.sta)(Statements.EndOfSelection), (0, _combi_1.sta)(Statements.LoadOfProgram), (0, _combi_1.sta)(Statements.TopOfPage), (0, _combi_1.sta)(Statements.EndOfPage), (0, _combi_1.sta)(Statements.Controls), (0, _combi_1.sta)(Statements.TypePools), (0, _combi_1.sta)(Statements.TypePool), (0, _combi_1.sta)(Statements.FunctionPool), (0, _combi_1.sub)(Structures.Normal), (0, _combi_1.sub)(Structures.Form), (0, _combi_1.sub)(Structures.Module), (0, _combi_1.sub)(Structures.FunctionModule), (0, _combi_1.sub)(Structures.Interface), (0, _combi_1.sub)(Structures.ClassDefinition), (0, _combi_1.sub)(Structures.ClassImplementation)));
17504
+ return (0, _combi_1.star)((0, _combi_1.alt)((0, _combi_1.sta)(Statements.ClassLocalFriends), (0, _combi_1.sta)(Statements.ClassDeferred), (0, _combi_1.sta)(Statements.Report), (0, _combi_1.sta)(Statements.Program), (0, _combi_1.sta)(Statements.Parameter), (0, _combi_1.sta)(Statements.CheckSelectOptions), (0, _combi_1.sta)(Statements.Get), (0, _combi_1.sta)(Statements.Initialization), (0, _combi_1.sta)(Statements.InterfaceDeferred), (0, _combi_1.sta)(Statements.SelectionScreen), (0, _combi_1.sta)(Statements.SelectOption), (0, _combi_1.sta)(Statements.AtSelectionScreen), (0, _combi_1.sta)(Statements.AtLineSelection), (0, _combi_1.sta)(Statements.AtPF), (0, _combi_1.sta)(Statements.AtUserCommand), (0, _combi_1.sta)(Statements.StartOfSelection), (0, _combi_1.sta)(Statements.EndOfSelection), (0, _combi_1.sta)(Statements.LoadOfProgram), (0, _combi_1.sta)(Statements.TopOfPage), (0, _combi_1.sta)(Statements.EndOfPage), (0, _combi_1.sta)(Statements.Controls), (0, _combi_1.sta)(Statements.TypePools), (0, _combi_1.sta)(Statements.TypePool), (0, _combi_1.sta)(Statements.FunctionPool), (0, _combi_1.sub)(Structures.Normal), (0, _combi_1.sub)(Structures.Form), (0, _combi_1.sub)(Structures.Module), (0, _combi_1.sub)(Structures.FunctionModule), (0, _combi_1.sub)(Structures.Interface), (0, _combi_1.sub)(Structures.ClassDefinition), (0, _combi_1.sub)(Structures.ClassImplementation)));
17308
17505
  }
17309
17506
  }
17310
17507
  exports.Any = Any;
@@ -17418,9 +17615,10 @@ const Statements = __webpack_require__(/*! ../../2_statements/statements */ "./n
17418
17615
  const _combi_1 = __webpack_require__(/*! ./_combi */ "./node_modules/@abaplint/core/build/src/abap/3_structures/structures/_combi.js");
17419
17616
  const when_1 = __webpack_require__(/*! ./when */ "./node_modules/@abaplint/core/build/src/abap/3_structures/structures/when.js");
17420
17617
  const _statement_1 = __webpack_require__(/*! ../../2_statements/statements/_statement */ "./node_modules/@abaplint/core/build/src/abap/2_statements/statements/_statement.js");
17618
+ const normal_1 = __webpack_require__(/*! ./normal */ "./node_modules/@abaplint/core/build/src/abap/3_structures/structures/normal.js");
17421
17619
  class Case {
17422
17620
  getMatcher() {
17423
- return (0, _combi_1.beginEnd)((0, _combi_1.sta)(Statements.Case), (0, _combi_1.star)((0, _combi_1.alt)((0, _combi_1.sub)(when_1.When), (0, _combi_1.sta)(_statement_1.MacroCall), (0, _combi_1.sta)(Statements.Include))), (0, _combi_1.sta)(Statements.EndCase));
17621
+ return (0, _combi_1.beginEnd)((0, _combi_1.sta)(Statements.Case), (0, _combi_1.seq)((0, _combi_1.star)((0, _combi_1.sub)(normal_1.Normal)), (0, _combi_1.star)((0, _combi_1.alt)((0, _combi_1.sub)(when_1.When), (0, _combi_1.sta)(_statement_1.MacroCall), (0, _combi_1.sta)(Statements.Include)))), (0, _combi_1.sta)(Statements.EndCase));
17424
17622
  }
17425
17623
  }
17426
17624
  exports.Case = Case;
@@ -20784,7 +20982,7 @@ class ObjectOriented {
20784
20982
  return ret;
20785
20983
  }
20786
20984
  addAliasedAttributes(classDefinition) {
20787
- for (const alias of classDefinition.getAliases()) {
20985
+ for (const alias of classDefinition.getAliases() || []) {
20788
20986
  const comp = alias.getComponent();
20789
20987
  const idef = this.scope.findInterfaceDefinition(comp.split("~")[0]);
20790
20988
  if (idef) {
@@ -20816,7 +21014,7 @@ class ObjectOriented {
20816
21014
  return undefined;
20817
21015
  }
20818
21016
  findMethodViaAlias(methodName, def) {
20819
- for (const a of def.getAliases()) {
21017
+ for (const a of def.getAliases() || []) {
20820
21018
  if (a.getName().toUpperCase() === methodName.toUpperCase()) {
20821
21019
  const comp = a.getComponent();
20822
21020
  const res = this.findMethodInInterface(comp.split("~")[0], comp.split("~")[1]);
@@ -20899,9 +21097,12 @@ class ObjectOriented {
20899
21097
  return undefined;
20900
21098
  }
20901
21099
  const upper = name.toUpperCase();
20902
- for (const a of def.getAttributes().getAll()) {
20903
- if (a.getName().toUpperCase() === upper) {
20904
- return a;
21100
+ const attr = def.getAttributes();
21101
+ if (attr) {
21102
+ for (const a of attr.getAll()) {
21103
+ if (a.getName().toUpperCase() === upper) {
21104
+ return a;
21105
+ }
20905
21106
  }
20906
21107
  }
20907
21108
  for (const a of def.getAliases() || []) {
@@ -21015,7 +21216,11 @@ class ObjectOriented {
21015
21216
  return { method: undefined, def: undefined };
21016
21217
  }
21017
21218
  findMethod(def, methodName) {
21018
- for (const method of def.getMethodDefinitions().getAll()) {
21219
+ const defs = def.getMethodDefinitions();
21220
+ if (defs === undefined) {
21221
+ return undefined;
21222
+ }
21223
+ for (const method of defs.getAll()) {
21019
21224
  if (method.getName().toUpperCase() === methodName.toUpperCase()) {
21020
21225
  if (method.isRedefinition()) {
21021
21226
  return this.findMethodInSuper(def, methodName);
@@ -21312,6 +21517,7 @@ var ReferenceType;
21312
21517
  ReferenceType["TableVoidReference"] = "Table (Void)";
21313
21518
  ReferenceType["MethodReference"] = "Method";
21314
21519
  ReferenceType["BuiltinMethodReference"] = "Builtin Method";
21520
+ ReferenceType["ConstructorReference"] = "Constructor Reference";
21315
21521
  ReferenceType["MethodImplementationReference"] = "Method Implementation";
21316
21522
  ReferenceType["TypeReference"] = "Type";
21317
21523
  ReferenceType["BuiltinTypeReference"] = "Builtin Type";
@@ -21769,6 +21975,9 @@ class TypeUtils {
21769
21975
  return this.isAssignable(source, target);
21770
21976
  }
21771
21977
  isAssignable(source, target) {
21978
+ if (source === undefined || target === undefined) {
21979
+ return true;
21980
+ }
21772
21981
  /*
21773
21982
  console.dir(source);
21774
21983
  console.dir(target);
@@ -21882,9 +22091,11 @@ class TypeUtils {
21882
22091
  && this.isCharLike(source)) {
21883
22092
  return true;
21884
22093
  }
22094
+ else if (source instanceof basic_1.StructureType) {
22095
+ return this.isCharLikeStrict(source);
22096
+ }
21885
22097
  else if (source instanceof basic_1.DataReference
21886
22098
  || source instanceof basic_1.ObjectReferenceType
21887
- || source instanceof basic_1.StructureType
21888
22099
  || source instanceof basic_1.GenericObjectReferenceType) {
21889
22100
  return false;
21890
22101
  }
@@ -23120,7 +23331,7 @@ class Compare {
23120
23331
  for (const t of node.findDirectExpressions(Expressions.Source)) {
23121
23332
  new source_1.Source().runSyntax(t, input);
23122
23333
  }
23123
- for (const t of node.findDirectExpressions(Expressions.SourceFieldSymbol)) {
23334
+ for (const t of node.findDirectExpressions(Expressions.SourceFieldSymbolChain)) {
23124
23335
  new source_field_symbol_1.SourceFieldSymbol().runSyntax(t, input);
23125
23336
  }
23126
23337
  for (const t of node.findDirectExpressions(Expressions.MethodCallChain)) {
@@ -25482,6 +25693,7 @@ class NewObject {
25482
25693
  const clas = input.scope.findClassDefinition(targetType.getIdentifierName());
25483
25694
  if (clas) {
25484
25695
  input.scope.addReference(typeToken, clas, _reference_1.ReferenceType.InferredType, input.filename);
25696
+ input.scope.addReference(typeToken, clas, _reference_1.ReferenceType.ConstructorReference, input.filename, { ooName: clas.getName() });
25485
25697
  }
25486
25698
  else {
25487
25699
  const intf = input.scope.findInterfaceDefinition(targetType.getIdentifierName());
@@ -25508,6 +25720,7 @@ class NewObject {
25508
25720
  const objDefinition = input.scope.findObjectDefinition(typeName);
25509
25721
  if (objDefinition) {
25510
25722
  input.scope.addReference(typeToken, objDefinition, _reference_1.ReferenceType.ObjectOrientedReference, input.filename);
25723
+ input.scope.addReference(typeToken, objDefinition, _reference_1.ReferenceType.ConstructorReference, input.filename, { ooName: objDefinition.getName() });
25511
25724
  const objref = new basic_1.ObjectReferenceType(objDefinition);
25512
25725
  const clas = input.scope.findClassDefinition(objref.getIdentifierName());
25513
25726
  if ((clas === null || clas === void 0 ? void 0 : clas.isAbstract()) === true) {
@@ -25623,7 +25836,7 @@ const Expressions = __webpack_require__(/*! ../../2_statements/expressions */ ".
25623
25836
  const source_1 = __webpack_require__(/*! ./source */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/source.js");
25624
25837
  class RaiseWith {
25625
25838
  runSyntax(node, input) {
25626
- for (const f of node.findDirectExpressions(Expressions.SimpleSource1)) {
25839
+ for (const f of node.findAllExpressionsMulti([Expressions.SimpleSource1, Expressions.Source])) {
25627
25840
  new source_1.Source().runSyntax(f, input);
25628
25841
  }
25629
25842
  }
@@ -25778,7 +25991,7 @@ class Select {
25778
25991
  const fields = this.findFields(node, input);
25779
25992
  if (fields.length === 0
25780
25993
  && node.findDirectExpression(Expressions.SQLFieldListLoop) === undefined) {
25781
- const message = `fields missing`;
25994
+ const message = `SELECT: fields missing`;
25782
25995
  input.issues.push((0, _syntax_input_1.syntaxIssue)(input, node.getFirstToken(), message));
25783
25996
  return;
25784
25997
  }
@@ -25957,7 +26170,7 @@ class Select {
25957
26170
  const ret = [];
25958
26171
  expr = node.findFirstExpression(Expressions.SQLFieldList);
25959
26172
  if (expr === undefined) {
25960
- expr = node.findDirectExpression(Expressions.SQLFieldListLoop);
26173
+ expr = node.findFirstExpression(Expressions.SQLFieldListLoop);
25961
26174
  }
25962
26175
  if (((_a = expr === null || expr === void 0 ? void 0 : expr.getFirstChild()) === null || _a === void 0 ? void 0 : _a.get()) instanceof Expressions.Dynamic) {
25963
26176
  new dynamic_1.Dynamic().runSyntax(expr.getFirstChild(), input);
@@ -26124,7 +26337,7 @@ class Source {
26124
26337
  const foundType = this.determineType(node, input, targetType);
26125
26338
  const bodyType = new conv_body_1.ConvBody().runSyntax(node.findDirectExpression(Expressions.ConvBody), input);
26126
26339
  if (new _type_utils_1.TypeUtils(input.scope).isAssignable(foundType, bodyType) === false) {
26127
- const message = "CONV: Types not compatible";
26340
+ const message = `CONV: Types not compatible, ${foundType === null || foundType === void 0 ? void 0 : foundType.constructor.name}, ${bodyType === null || bodyType === void 0 ? void 0 : bodyType.constructor.name}`;
26128
26341
  input.issues.push((0, _syntax_input_1.syntaxIssue)(input, node.getFirstToken(), message));
26129
26342
  return new basic_1.VoidType(_syntax_input_1.CheckSyntaxKey);
26130
26343
  }
@@ -28409,8 +28622,11 @@ class ClassImplementation {
28409
28622
  input.issues.push((0, _syntax_input_1.syntaxIssue)(input, node.getFirstToken(), message));
28410
28623
  return;
28411
28624
  }
28412
- for (const t of classDefinition.getTypeDefinitions().getAll()) {
28413
- input.scope.addType(t.type);
28625
+ const types = classDefinition.getTypeDefinitions();
28626
+ if (types !== undefined) {
28627
+ for (const t of types.getAll()) {
28628
+ input.scope.addType(t.type);
28629
+ }
28414
28630
  }
28415
28631
  const sup = input.scope.findClassDefinition(classDefinition.getSuperClass());
28416
28632
  if (sup) {
@@ -28423,10 +28639,12 @@ class ClassImplementation {
28423
28639
  input.scope.addIdentifier(new _typed_identifier_1.TypedIdentifier(new tokens_1.Identifier(new position_1.Position(1, 1), "me"), _builtin_1.BuiltIn.filename, new basic_1.ObjectReferenceType(classDefinition)));
28424
28640
  helper.addAliasedAttributes(classDefinition); // todo, this is not correct, take care of instance vs static
28425
28641
  const classAttributes = classDefinition.getAttributes();
28426
- input.scope.addList(classAttributes.getConstants());
28427
- input.scope.addList(classAttributes.getStatic());
28428
- for (const i of classAttributes.getInstance()) {
28429
- input.scope.addExtraLikeType(i);
28642
+ if (classAttributes !== undefined) {
28643
+ input.scope.addList(classAttributes.getConstants());
28644
+ input.scope.addList(classAttributes.getStatic());
28645
+ for (const i of classAttributes.getInstance()) {
28646
+ input.scope.addExtraLikeType(i);
28647
+ }
28430
28648
  }
28431
28649
  helper.fromSuperClassesAndInterfaces(classDefinition);
28432
28650
  }
@@ -28928,6 +29146,7 @@ const _type_utils_1 = __webpack_require__(/*! ../_type_utils */ "./node_modules/
28928
29146
  const _syntax_input_1 = __webpack_require__(/*! ../_syntax_input */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/_syntax_input.js");
28929
29147
  class CreateObject {
28930
29148
  runSyntax(node, input) {
29149
+ var _a;
28931
29150
  let cdef = undefined;
28932
29151
  // CREATE OBJECT, TYPE
28933
29152
  const type = node.findExpressionAfterToken("TYPE");
@@ -28937,6 +29156,7 @@ class CreateObject {
28937
29156
  cdef = input.scope.findClassDefinition(name);
28938
29157
  if (cdef) {
28939
29158
  input.scope.addReference(token, cdef, _reference_1.ReferenceType.ObjectOrientedReference, input.filename);
29159
+ input.scope.addReference(token, cdef, _reference_1.ReferenceType.ConstructorReference, input.filename, { ooName: cdef.getName() });
28940
29160
  if (cdef.isAbstract() === true) {
28941
29161
  const message = cdef.getName() + " is abstract, cannot be instantiated";
28942
29162
  input.issues.push((0, _syntax_input_1.syntaxIssue)(input, node.getFirstToken(), message));
@@ -28956,60 +29176,61 @@ class CreateObject {
28956
29176
  for (const s of node.findDirectExpressions(Expressions.Source)) {
28957
29177
  new source_1.Source().runSyntax(s, input);
28958
29178
  }
28959
- let first = true;
28960
- for (const t of node.findAllExpressions(Expressions.Target)) {
29179
+ for (const t of ((_a = node.findDirectExpression(Expressions.ParameterListExceptions)) === null || _a === void 0 ? void 0 : _a.findAllExpressions(Expressions.Target)) || []) {
29180
+ new target_1.Target().runSyntax(t, input);
29181
+ }
29182
+ const t = node.findDirectExpression(Expressions.Target);
29183
+ if (t) {
28961
29184
  const found = new target_1.Target().runSyntax(t, input);
28962
- if (first === true) {
28963
- first = false;
28964
- if (found instanceof basic_1.VoidType) {
28965
- continue;
28966
- }
28967
- else if (found instanceof basic_1.UnknownType) {
28968
- const message = "Target type unknown, " + t.concatTokens();
29185
+ if (found instanceof basic_1.VoidType) {
29186
+ // do nothing
29187
+ }
29188
+ else if (found instanceof basic_1.UnknownType) {
29189
+ const message = "Target type unknown, " + t.concatTokens();
29190
+ input.issues.push((0, _syntax_input_1.syntaxIssue)(input, node.getFirstToken(), message));
29191
+ return;
29192
+ }
29193
+ else if (!(found instanceof basic_1.ObjectReferenceType)
29194
+ && !(found instanceof basic_1.AnyType)
29195
+ && !(found instanceof basic_1.DataType)
29196
+ && !(found instanceof basic_1.GenericObjectReferenceType)) {
29197
+ const message = "Target must be an object reference, " + t.concatTokens();
29198
+ input.issues.push((0, _syntax_input_1.syntaxIssue)(input, node.getFirstToken(), message));
29199
+ return;
29200
+ }
29201
+ else if (found instanceof basic_1.GenericObjectReferenceType && type === undefined) {
29202
+ const message = "Generic type, cannot be instantiated";
29203
+ input.issues.push((0, _syntax_input_1.syntaxIssue)(input, node.getFirstToken(), message));
29204
+ return;
29205
+ }
29206
+ else if (found instanceof basic_1.ObjectReferenceType) {
29207
+ const id = found.getIdentifier();
29208
+ if (id instanceof types_1.InterfaceDefinition && type === undefined) {
29209
+ const message = "Interface reference, cannot be instantiated";
28969
29210
  input.issues.push((0, _syntax_input_1.syntaxIssue)(input, node.getFirstToken(), message));
28970
29211
  return;
28971
29212
  }
28972
- else if (!(found instanceof basic_1.ObjectReferenceType)
28973
- && !(found instanceof basic_1.AnyType)
28974
- && !(found instanceof basic_1.DataType)
28975
- && !(found instanceof basic_1.GenericObjectReferenceType)) {
28976
- const message = "Target must be an object reference, " + t.concatTokens();
29213
+ else if (found instanceof basic_1.ObjectReferenceType
29214
+ && type === undefined
29215
+ && input.scope.findInterfaceDefinition(found.getQualifiedName())) {
29216
+ const message = "Interface reference, cannot be instantiated";
28977
29217
  input.issues.push((0, _syntax_input_1.syntaxIssue)(input, node.getFirstToken(), message));
28978
29218
  return;
28979
29219
  }
28980
- else if (found instanceof basic_1.GenericObjectReferenceType && type === undefined) {
28981
- const message = "Generic type, cannot be instantiated";
29220
+ else if (id instanceof types_1.ClassDefinition && cdef === undefined) {
29221
+ cdef = id;
29222
+ }
29223
+ if (type === undefined && id instanceof types_1.ClassDefinition && id.isAbstract() === true) {
29224
+ const message = id.getName() + " is abstract, cannot be instantiated";
28982
29225
  input.issues.push((0, _syntax_input_1.syntaxIssue)(input, node.getFirstToken(), message));
28983
29226
  return;
28984
29227
  }
28985
- else if (found instanceof basic_1.ObjectReferenceType) {
28986
- const id = found.getIdentifier();
28987
- if (id instanceof types_1.InterfaceDefinition && type === undefined) {
28988
- const message = "Interface reference, cannot be instantiated";
28989
- input.issues.push((0, _syntax_input_1.syntaxIssue)(input, node.getFirstToken(), message));
28990
- return;
28991
- }
28992
- else if (found instanceof basic_1.ObjectReferenceType
28993
- && type === undefined
28994
- && input.scope.findInterfaceDefinition(found.getQualifiedName())) {
28995
- const message = "Interface reference, cannot be instantiated";
28996
- input.issues.push((0, _syntax_input_1.syntaxIssue)(input, node.getFirstToken(), message));
28997
- return;
28998
- }
28999
- else if (id instanceof types_1.ClassDefinition && cdef === undefined) {
29000
- cdef = id;
29001
- }
29002
- if (type === undefined && id instanceof types_1.ClassDefinition && id.isAbstract() === true) {
29003
- const message = id.getName() + " is abstract, cannot be instantiated";
29004
- input.issues.push((0, _syntax_input_1.syntaxIssue)(input, node.getFirstToken(), message));
29005
- return;
29006
- }
29007
- }
29008
29228
  }
29009
29229
  }
29010
29230
  for (const t of node.findDirectExpressions(Expressions.Dynamic)) {
29011
29231
  new dynamic_1.Dynamic().runSyntax(t, input);
29012
29232
  }
29233
+ input.scope.addReference(t === null || t === void 0 ? void 0 : t.getFirstToken(), cdef, _reference_1.ReferenceType.ConstructorReference, input.filename, { ooName: cdef === null || cdef === void 0 ? void 0 : cdef.getName() });
29013
29234
  this.validateParameters(cdef, node, input);
29014
29235
  }
29015
29236
  validateParameters(cdef, node, input) {
@@ -30575,17 +30796,18 @@ class MethodImplementation {
30575
30796
  return;
30576
30797
  }
30577
30798
  const { method: methodDefinition } = helper.searchMethodName(classDefinition, methodName);
30578
- if (methodDefinition === undefined) {
30579
- const message = "Method definition \"" + methodName + "\" not found";
30580
- input.issues.push((0, _syntax_input_1.syntaxIssue)(input, node.getFirstToken(), message));
30581
- return;
30582
- }
30583
30799
  const start = node.getFirstToken().getStart();
30584
- if (methodDefinition.isStatic() === false) {
30800
+ if ((methodDefinition === null || methodDefinition === void 0 ? void 0 : methodDefinition.isStatic()) === false) {
30585
30801
  input.scope.push(_scope_type_1.ScopeType.MethodInstance, methodName, start, input.filename);
30586
30802
  input.scope.addList(classDefinition.getAttributes().getInstance());
30587
30803
  }
30588
30804
  input.scope.push(_scope_type_1.ScopeType.Method, methodName, start, input.filename);
30805
+ // note: the scope must be pushed before returning
30806
+ if (methodDefinition === undefined) {
30807
+ const message = "Method definition \"" + methodName + "\" not found";
30808
+ input.issues.push((0, _syntax_input_1.syntaxIssue)(input, node.getFirstToken(), message));
30809
+ return;
30810
+ }
30589
30811
  input.scope.addReference(methodToken, methodDefinition, _reference_1.ReferenceType.MethodImplementationReference, input.filename);
30590
30812
  input.scope.addList(methodDefinition.getParameters().getAll());
30591
30813
  for (const i of helper.findInterfaces(classDefinition)) {
@@ -31386,7 +31608,7 @@ class ReadTable {
31386
31608
  if (indexSource) {
31387
31609
  const indexType = new source_1.Source().runSyntax(indexSource, input);
31388
31610
  if (new _type_utils_1.TypeUtils(input.scope).isAssignable(indexType, basic_1.IntegerType.get()) === false) {
31389
- const message = "READ TABLE, INDEX must be simple";
31611
+ const message = "READ TABLE, INDEX must be simple, got " + (indexType === null || indexType === void 0 ? void 0 : indexType.constructor.name);
31390
31612
  input.issues.push((0, _syntax_input_1.syntaxIssue)(input, node.getFirstToken(), message));
31391
31613
  return;
31392
31614
  }
@@ -31681,30 +31903,35 @@ const basic_1 = __webpack_require__(/*! ../../types/basic */ "./node_modules/@ab
31681
31903
  const _syntax_input_1 = __webpack_require__(/*! ../_syntax_input */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/_syntax_input.js");
31682
31904
  class SelectionScreen {
31683
31905
  runSyntax(node, input) {
31684
- const field = node.findFirstExpression(Expressions.InlineField);
31685
- if (field === undefined) {
31906
+ const blockNode = node.findFirstExpression(Expressions.BlockName);
31907
+ const blockToken = blockNode === null || blockNode === void 0 ? void 0 : blockNode.getFirstToken();
31908
+ const blockName = blockNode === null || blockNode === void 0 ? void 0 : blockNode.concatTokens();
31909
+ if (blockName !== undefined && blockName.length > 16) {
31910
+ const message = "SELECTION-SCREEN block name too long, " + blockName;
31911
+ input.issues.push((0, _syntax_input_1.syntaxIssue)(input, node.getFirstToken(), message));
31686
31912
  return;
31687
31913
  }
31688
- if (field.getFirstToken().getStr().length > 8) {
31914
+ const field = node.findFirstExpression(Expressions.InlineField);
31915
+ if (field !== undefined && field.getFirstToken().getStr().length > 8) {
31689
31916
  const message = "SELECTION-SCREEN name too long, " + field.getFirstToken().getStr();
31690
31917
  input.issues.push((0, _syntax_input_1.syntaxIssue)(input, field.getFirstToken(), message));
31691
31918
  return;
31692
31919
  }
31693
- const name = field.getFirstToken();
31920
+ const fieldName = field === null || field === void 0 ? void 0 : field.getFirstToken();
31694
31921
  const concat = node.concatTokens().toUpperCase();
31695
- if (concat.includes("BEGIN OF TABBED BLOCK")) {
31922
+ if (concat.includes("BEGIN OF TABBED BLOCK") && blockToken) {
31696
31923
  const type = new basic_1.StructureType([
31697
31924
  { name: "PROG", type: new basic_1.CharacterType(40) },
31698
31925
  { name: "DYNNR", type: new basic_1.CharacterType(4) },
31699
31926
  { name: "ACTIVETAB", type: new basic_1.CharacterType(132) },
31700
31927
  ]);
31701
- input.scope.addIdentifier(new _typed_identifier_1.TypedIdentifier(name, input.filename, type, ["selection_screen_tab" /* IdentifierMeta.SelectionScreenTab */]));
31928
+ input.scope.addIdentifier(new _typed_identifier_1.TypedIdentifier(blockToken, input.filename, type, ["selection_screen_tab" /* IdentifierMeta.SelectionScreenTab */]));
31702
31929
  }
31703
- else if (concat.startsWith("SELECTION-SCREEN TAB")) {
31704
- input.scope.addIdentifier(new _typed_identifier_1.TypedIdentifier(name, input.filename, new basic_1.CharacterType(83), ["selection_screen_tab" /* IdentifierMeta.SelectionScreenTab */]));
31930
+ else if (concat.startsWith("SELECTION-SCREEN TAB") && fieldName) {
31931
+ input.scope.addIdentifier(new _typed_identifier_1.TypedIdentifier(fieldName, input.filename, new basic_1.CharacterType(83), ["selection_screen_tab" /* IdentifierMeta.SelectionScreenTab */]));
31705
31932
  }
31706
- else {
31707
- input.scope.addIdentifier(new _typed_identifier_1.TypedIdentifier(name, input.filename, new basic_1.CharacterType(83)));
31933
+ else if (fieldName) {
31934
+ input.scope.addIdentifier(new _typed_identifier_1.TypedIdentifier(fieldName, input.filename, new basic_1.CharacterType(83)));
31708
31935
  }
31709
31936
  }
31710
31937
  }
@@ -32325,7 +32552,7 @@ class Tables {
32325
32552
  }
32326
32553
  let name = nameToken.getStr();
32327
32554
  if (name.startsWith("*")) {
32328
- name = name.substr(1);
32555
+ name = name.substring(1);
32329
32556
  }
32330
32557
  // lookupTableOrView will also give Unknown and Void
32331
32558
  const found = (_b = input.scope.getDDIC()) === null || _b === void 0 ? void 0 : _b.lookupTableOrView(name);
@@ -32333,10 +32560,10 @@ class Tables {
32333
32560
  input.scope.getDDICReferences().addUsing(input.scope.getParentObj(), { object: found.object, filename: input.filename, token: nameToken });
32334
32561
  if (input.scope.getType() === _scope_type_1.ScopeType.Form || input.scope.getType() === _scope_type_1.ScopeType.FunctionModule) {
32335
32562
  // hoist TABLES definitions to global scope
32336
- input.scope.addNamedIdentifierToParent(nameToken.getStr(), new _typed_identifier_1.TypedIdentifier(nameToken, input.filename, found.type));
32563
+ input.scope.addNamedIdentifierToParent(nameToken.getStr(), new _typed_identifier_1.TypedIdentifier(nameToken, input.filename, found.type, ["tables" /* IdentifierMeta.Tables */]));
32337
32564
  }
32338
32565
  else {
32339
- input.scope.addIdentifier(new _typed_identifier_1.TypedIdentifier(nameToken, input.filename, found.type));
32566
+ input.scope.addIdentifier(new _typed_identifier_1.TypedIdentifier(nameToken, input.filename, found.type, ["tables" /* IdentifierMeta.Tables */]));
32340
32567
  }
32341
32568
  return;
32342
32569
  }
@@ -33022,6 +33249,9 @@ class Data {
33022
33249
  if (found instanceof Basic.UnknownType) {
33023
33250
  return new _typed_identifier_1.TypedIdentifier(name, input.filename, new Basic.UnknownType("unknown type, " + typeName));
33024
33251
  }
33252
+ if (found instanceof Basic.TableType && found.isWithHeader()) {
33253
+ found = found.getRowType();
33254
+ }
33025
33255
  if (!(found instanceof Basic.StructureType)) {
33026
33256
  const message = "not structured, " + typeName;
33027
33257
  input.issues.push((0, _syntax_input_1.syntaxIssue)(input, typeToken, message));
@@ -34183,6 +34413,7 @@ exports.SELECTION_EVENTS = [
34183
34413
  Statements.StartOfSelection,
34184
34414
  Statements.AtSelectionScreen,
34185
34415
  Statements.AtLineSelection,
34416
+ Statements.AtPF,
34186
34417
  Statements.AtUserCommand,
34187
34418
  Statements.EndOfSelection,
34188
34419
  Statements.Initialization,
@@ -34221,6 +34452,7 @@ const Expressions = __webpack_require__(/*! ../2_statements/expressions */ "./no
34221
34452
  const flow_graph_1 = __webpack_require__(/*! ./flow_graph */ "./node_modules/@abaplint/core/build/src/abap/flow/flow_graph.js");
34222
34453
  const objects_1 = __webpack_require__(/*! ../../objects */ "./node_modules/@abaplint/core/build/src/objects/index.js");
34223
34454
  const selection_events_1 = __webpack_require__(/*! ./selection_events */ "./node_modules/@abaplint/core/build/src/abap/flow/selection_events.js");
34455
+ const virtual_position_1 = __webpack_require__(/*! ../../virtual_position */ "./node_modules/@abaplint/core/build/src/virtual_position.js");
34224
34456
  class StatementFlow {
34225
34457
  constructor() {
34226
34458
  this.counter = 0;
@@ -34257,7 +34489,7 @@ class StatementFlow {
34257
34489
  throw new Error("StatementFlow, unknown structure");
34258
34490
  }
34259
34491
  }
34260
- if (obj instanceof objects_1.Program) {
34492
+ if (obj instanceof objects_1.Program || obj instanceof objects_1.FunctionGroup) {
34261
34493
  // find the top level events
34262
34494
  let inEvent = false;
34263
34495
  let collected = [];
@@ -34284,7 +34516,8 @@ class StatementFlow {
34284
34516
  if (inEvent === true) {
34285
34517
  ret.push(this.runEvent(collected, name));
34286
34518
  }
34287
- else if (collected.length > 0) {
34519
+ else if (collected.length > 0
34520
+ && !(obj instanceof objects_1.FunctionGroup)) {
34288
34521
  // implicit START-OF-SELECTION
34289
34522
  ret.push(this.runEvent(collected, "START-OF-SELECTION."));
34290
34523
  }
@@ -34308,7 +34541,8 @@ class StatementFlow {
34308
34541
  var _a;
34309
34542
  return ((_a = f.findDirectStructure(Structures.Body)) === null || _a === void 0 ? void 0 : _a.getChildren()) || [];
34310
34543
  }
34311
- buildName(statement) {
34544
+ // note: it must handle macros and chained statements
34545
+ static buildName(statement) {
34312
34546
  let token = undefined;
34313
34547
  const colon = statement.getColon();
34314
34548
  if (colon === undefined) {
@@ -34322,12 +34556,18 @@ class StatementFlow {
34322
34556
  }
34323
34557
  }
34324
34558
  }
34559
+ let extra = "";
34560
+ const tStart = token === null || token === void 0 ? void 0 : token.getStart();
34561
+ if (tStart instanceof virtual_position_1.VirtualPosition) {
34562
+ extra += "$" + tStart.vrow;
34563
+ extra += "," + tStart.vcol;
34564
+ }
34325
34565
  if (token === undefined) {
34326
34566
  return "tokenError";
34327
34567
  }
34328
34568
  return statement.get().constructor.name +
34329
34569
  ":" + token.getRow() +
34330
- "," + token.getCol();
34570
+ "," + token.getCol() + extra;
34331
34571
  }
34332
34572
  traverseBody(children, context) {
34333
34573
  const graph = new flow_graph_1.FlowGraph(this.counter++);
@@ -34340,7 +34580,7 @@ class StatementFlow {
34340
34580
  if (c.get() instanceof Structures.Normal) {
34341
34581
  const firstChild = c.getFirstChild(); // "Normal" only has one child
34342
34582
  if (firstChild instanceof nodes_1.StatementNode) {
34343
- const name = this.buildName(firstChild);
34583
+ const name = StatementFlow.buildName(firstChild);
34344
34584
  graph.addEdge(current, name, flow_graph_1.FLOW_EDGE_TYPE.undefined);
34345
34585
  current = name;
34346
34586
  if (firstChild.get() instanceof Statements.Check) {
@@ -34389,7 +34629,7 @@ class StatementFlow {
34389
34629
  let current = graph.getStart();
34390
34630
  const type = n.get();
34391
34631
  if (type instanceof Structures.If) {
34392
- const ifName = this.buildName(n.findDirectStatement(Statements.If));
34632
+ const ifName = StatementFlow.buildName(n.findDirectStatement(Statements.If));
34393
34633
  const sub = this.traverseBody(this.findBody(n), context);
34394
34634
  graph.addEdge(current, ifName, flow_graph_1.FLOW_EDGE_TYPE.undefined);
34395
34635
  graph.addGraph(ifName, sub, flow_graph_1.FLOW_EDGE_TYPE.true);
@@ -34400,7 +34640,7 @@ class StatementFlow {
34400
34640
  if (elseifst === undefined) {
34401
34641
  continue;
34402
34642
  }
34403
- const elseIfName = this.buildName(elseifst);
34643
+ const elseIfName = StatementFlow.buildName(elseifst);
34404
34644
  const sub = this.traverseBody(this.findBody(e), context);
34405
34645
  graph.addEdge(current, elseIfName, flow_graph_1.FLOW_EDGE_TYPE.false);
34406
34646
  graph.addGraph(elseIfName, sub, flow_graph_1.FLOW_EDGE_TYPE.true);
@@ -34410,7 +34650,7 @@ class StatementFlow {
34410
34650
  const els = n.findDirectStructure(Structures.Else);
34411
34651
  const elsest = els === null || els === void 0 ? void 0 : els.findDirectStatement(Statements.Else);
34412
34652
  if (els && elsest) {
34413
- const elseName = this.buildName(elsest);
34653
+ const elseName = StatementFlow.buildName(elsest);
34414
34654
  const sub = this.traverseBody(this.findBody(els), context);
34415
34655
  graph.addEdge(current, elseName, flow_graph_1.FLOW_EDGE_TYPE.false);
34416
34656
  graph.addGraph(elseName, sub, flow_graph_1.FLOW_EDGE_TYPE.undefined);
@@ -34427,7 +34667,7 @@ class StatementFlow {
34427
34667
  || type instanceof Structures.Select
34428
34668
  || type instanceof Structures.LoopAtScreen
34429
34669
  || type instanceof Structures.Do) {
34430
- const loopName = this.buildName(n.getFirstStatement());
34670
+ const loopName = StatementFlow.buildName(n.getFirstStatement());
34431
34671
  const sub = this.traverseBody(this.findBody(n), Object.assign(Object.assign({}, context), { loopStart: loopName, loopEnd: graph.getEnd() }));
34432
34672
  graph.addEdge(current, loopName, flow_graph_1.FLOW_EDGE_TYPE.undefined);
34433
34673
  graph.addGraph(loopName, sub, flow_graph_1.FLOW_EDGE_TYPE.true);
@@ -34436,10 +34676,12 @@ class StatementFlow {
34436
34676
  }
34437
34677
  else if (type instanceof Structures.Data
34438
34678
  || type instanceof Structures.Constants
34679
+ || type instanceof Structures.Statics
34680
+ || type instanceof Structures.ExecSQL
34439
34681
  || type instanceof Structures.Types) {
34440
34682
  // these doesnt affect control flow, so just take the first statement
34441
34683
  const statement = n.getFirstStatement();
34442
- const name = this.buildName(statement);
34684
+ const name = StatementFlow.buildName(statement);
34443
34685
  graph.addEdge(current, name, flow_graph_1.FLOW_EDGE_TYPE.undefined);
34444
34686
  graph.addEdge(name, graph.getEnd(), flow_graph_1.FLOW_EDGE_TYPE.undefined);
34445
34687
  }
@@ -34447,7 +34689,7 @@ class StatementFlow {
34447
34689
  || type instanceof Structures.AtLast
34448
34690
  || type instanceof Structures.At
34449
34691
  || type instanceof Structures.OnChange) {
34450
- const name = this.buildName(n.getFirstStatement());
34692
+ const name = StatementFlow.buildName(n.getFirstStatement());
34451
34693
  const body = this.traverseBody(this.findBody(n), context);
34452
34694
  graph.addEdge(current, name, flow_graph_1.FLOW_EDGE_TYPE.undefined);
34453
34695
  graph.addGraph(name, body, flow_graph_1.FLOW_EDGE_TYPE.undefined);
@@ -34455,13 +34697,13 @@ class StatementFlow {
34455
34697
  graph.addEdge(current, graph.getEnd(), flow_graph_1.FLOW_EDGE_TYPE.undefined);
34456
34698
  }
34457
34699
  else if (type instanceof Structures.Try) {
34458
- const tryName = this.buildName(n.getFirstStatement());
34700
+ const tryName = StatementFlow.buildName(n.getFirstStatement());
34459
34701
  const body = this.traverseBody(this.findBody(n), context);
34460
34702
  graph.addEdge(current, tryName, flow_graph_1.FLOW_EDGE_TYPE.undefined);
34461
34703
  graph.addGraph(tryName, body, flow_graph_1.FLOW_EDGE_TYPE.undefined);
34462
34704
  graph.addEdge(body.getEnd(), graph.getEnd(), flow_graph_1.FLOW_EDGE_TYPE.undefined);
34463
34705
  for (const c of n.findDirectStructures(Structures.Catch)) {
34464
- const catchName = this.buildName(c.getFirstStatement());
34706
+ const catchName = StatementFlow.buildName(c.getFirstStatement());
34465
34707
  const catchBody = this.traverseBody(this.findBody(c), context);
34466
34708
  // TODO: this does not take exceptions into account
34467
34709
  graph.addEdge(body.getEnd(), catchName, flow_graph_1.FLOW_EDGE_TYPE.undefined);
@@ -34470,8 +34712,16 @@ class StatementFlow {
34470
34712
  }
34471
34713
  // TODO, handle CLEANUP
34472
34714
  }
34715
+ else if (type instanceof Structures.CatchSystemExceptions) {
34716
+ // TODO: this is not completely correct
34717
+ const catchName = StatementFlow.buildName(n.getFirstStatement());
34718
+ const body = this.traverseBody(this.findBody(n), context);
34719
+ graph.addEdge(current, catchName, flow_graph_1.FLOW_EDGE_TYPE.undefined);
34720
+ graph.addGraph(catchName, body, flow_graph_1.FLOW_EDGE_TYPE.undefined);
34721
+ graph.addEdge(body.getEnd(), graph.getEnd(), flow_graph_1.FLOW_EDGE_TYPE.undefined);
34722
+ }
34473
34723
  else if (type instanceof Structures.Case) {
34474
- const caseName = this.buildName(n.getFirstStatement());
34724
+ const caseName = StatementFlow.buildName(n.getFirstStatement());
34475
34725
  graph.addEdge(current, caseName, flow_graph_1.FLOW_EDGE_TYPE.undefined);
34476
34726
  let othersFound = false;
34477
34727
  for (const w of n.findDirectStructures(Structures.When)) {
@@ -34482,7 +34732,7 @@ class StatementFlow {
34482
34732
  if (first.get() instanceof Statements.WhenOthers) {
34483
34733
  othersFound = true;
34484
34734
  }
34485
- const firstName = this.buildName(first);
34735
+ const firstName = StatementFlow.buildName(first);
34486
34736
  const sub = this.traverseBody(this.findBody(w), context);
34487
34737
  graph.addEdge(caseName, firstName, flow_graph_1.FLOW_EDGE_TYPE.undefined);
34488
34738
  graph.addGraph(firstName, sub, flow_graph_1.FLOW_EDGE_TYPE.undefined);
@@ -34493,7 +34743,7 @@ class StatementFlow {
34493
34743
  }
34494
34744
  }
34495
34745
  else if (type instanceof Structures.CaseType) {
34496
- const caseName = this.buildName(n.getFirstStatement());
34746
+ const caseName = StatementFlow.buildName(n.getFirstStatement());
34497
34747
  graph.addEdge(current, caseName, flow_graph_1.FLOW_EDGE_TYPE.undefined);
34498
34748
  let othersFound = false;
34499
34749
  for (const w of n.findDirectStructures(Structures.WhenType)) {
@@ -34504,7 +34754,7 @@ class StatementFlow {
34504
34754
  if (first.get() instanceof Statements.WhenOthers) {
34505
34755
  othersFound = true;
34506
34756
  }
34507
- const firstName = this.buildName(first);
34757
+ const firstName = StatementFlow.buildName(first);
34508
34758
  const sub = this.traverseBody(this.findBody(w), context);
34509
34759
  graph.addEdge(caseName, firstName, flow_graph_1.FLOW_EDGE_TYPE.undefined);
34510
34760
  graph.addGraph(firstName, sub, flow_graph_1.FLOW_EDGE_TYPE.undefined);
@@ -34514,6 +34764,9 @@ class StatementFlow {
34514
34764
  graph.addEdge(caseName, graph.getEnd(), flow_graph_1.FLOW_EDGE_TYPE.undefined);
34515
34765
  }
34516
34766
  }
34767
+ else if (type instanceof Structures.Define) {
34768
+ // do nothing
34769
+ }
34517
34770
  else {
34518
34771
  console.dir("StatementFlow,todo, " + n.get().constructor.name);
34519
34772
  }
@@ -35650,6 +35903,10 @@ class AbstractType {
35650
35903
  var _a;
35651
35904
  return (_a = this.data) === null || _a === void 0 ? void 0 : _a.RTTIName;
35652
35905
  }
35906
+ getDescription() {
35907
+ var _a;
35908
+ return (_a = this.data) === null || _a === void 0 ? void 0 : _a.description;
35909
+ }
35653
35910
  getConversionExit() {
35654
35911
  var _a;
35655
35912
  return (_a = this.data) === null || _a === void 0 ? void 0 : _a.conversionExit;
@@ -36675,10 +36932,11 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
36675
36932
  exports.StructureType = void 0;
36676
36933
  const _abstract_type_1 = __webpack_require__(/*! ./_abstract_type */ "./node_modules/@abaplint/core/build/src/abap/types/basic/_abstract_type.js");
36677
36934
  class StructureType extends _abstract_type_1.AbstractType {
36678
- constructor(components, qualifiedName, ddicName) {
36935
+ constructor(components, qualifiedName, ddicName, description) {
36679
36936
  super({
36680
36937
  qualifiedName: qualifiedName,
36681
36938
  ddicName: ddicName,
36939
+ description: description,
36682
36940
  });
36683
36941
  if (components.length === 0) {
36684
36942
  throw new Error("Structure does not contain any components");
@@ -36755,9 +37013,12 @@ var TableKeyType;
36755
37013
  TableKeyType["empty"] = "EMPTY";
36756
37014
  })(TableKeyType || (exports.TableKeyType = TableKeyType = {}));
36757
37015
  class TableType extends _abstract_type_1.AbstractType {
36758
- constructor(rowType, options, qualifiedName) {
37016
+ constructor(rowType, options, qualifiedName, description) {
36759
37017
  var _a;
36760
- super({ qualifiedName: qualifiedName });
37018
+ super({
37019
+ qualifiedName: qualifiedName,
37020
+ description: description,
37021
+ });
36761
37022
  this.rowType = rowType;
36762
37023
  this.options = options;
36763
37024
  if (((_a = options.primaryKey) === null || _a === void 0 ? void 0 : _a.type) === TableAccessType.standard && options.primaryKey.isUnique === true) {
@@ -38598,20 +38859,84 @@ exports.ArtifactsRules = ArtifactsRules;
38598
38859
  Object.defineProperty(exports, "__esModule", ({ value: true }));
38599
38860
  exports.CDSDetermineTypes = void 0;
38600
38861
  const basic_1 = __webpack_require__(/*! ../abap/types/basic */ "./node_modules/@abaplint/core/build/src/abap/types/basic/index.js");
38862
+ const ddic_1 = __webpack_require__(/*! ../ddic */ "./node_modules/@abaplint/core/build/src/ddic.js");
38601
38863
  class CDSDetermineTypes {
38602
- parseType(_reg, parsedData) {
38864
+ parseType(reg, parsedData, ddlsName) {
38865
+ const ddic = new ddic_1.DDIC(reg);
38603
38866
  if ((parsedData === null || parsedData === void 0 ? void 0 : parsedData.fields.length) === 0) {
38604
38867
  return new basic_1.VoidType("DDLS:todo");
38605
38868
  }
38606
38869
  else {
38607
38870
  const components = [];
38608
38871
  for (const f of (parsedData === null || parsedData === void 0 ? void 0 : parsedData.fields) || []) {
38609
- components.push({
38610
- name: f.name,
38611
- type: new basic_1.VoidType("DDLS:fieldname"),
38612
- });
38872
+ if (f.prefix !== "") {
38873
+ const prefixUpper = f.prefix.toUpperCase();
38874
+ let source = parsedData.sources.find((s) => { var _a; return ((_a = s.as) === null || _a === void 0 ? void 0 : _a.toUpperCase()) === prefixUpper; });
38875
+ if ((source === null || source === void 0 ? void 0 : source.name) === undefined) {
38876
+ source = parsedData.sources.find((s) => s.name.toUpperCase() === prefixUpper);
38877
+ }
38878
+ if ((source === null || source === void 0 ? void 0 : source.name) === undefined
38879
+ && (parsedData.associations.find((s) => s.name.toUpperCase() === prefixUpper)
38880
+ || parsedData.associations.find((s) => { var _a; return ((_a = s.as) === null || _a === void 0 ? void 0 : _a.toUpperCase()) === prefixUpper; }))) {
38881
+ components.push({
38882
+ name: f.name,
38883
+ type: new basic_1.VoidType("DDLS:association"),
38884
+ });
38885
+ continue;
38886
+ }
38887
+ if ((source === null || source === void 0 ? void 0 : source.name) === undefined) {
38888
+ components.push({
38889
+ name: f.name,
38890
+ type: new basic_1.UnknownType("CDS parser error, unknown source, " + ddlsName),
38891
+ });
38892
+ continue;
38893
+ }
38894
+ const lookup = ddic.lookupTableOrView(source.name);
38895
+ if (lookup.type) {
38896
+ if (lookup.type instanceof basic_1.StructureType) {
38897
+ const type = lookup.type.getComponentByName(f.name);
38898
+ if (type) {
38899
+ components.push({
38900
+ name: f.name,
38901
+ type: type,
38902
+ });
38903
+ }
38904
+ else {
38905
+ components.push({
38906
+ name: f.name,
38907
+ type: new basic_1.UnknownType(f.name + " not found in " + source.name + ", CDSDetermineTypes"),
38908
+ });
38909
+ }
38910
+ }
38911
+ else {
38912
+ // its void or unknown
38913
+ components.push({
38914
+ name: f.name,
38915
+ type: lookup.type,
38916
+ });
38917
+ }
38918
+ }
38919
+ else if (reg.inErrorNamespace(source.name)) {
38920
+ components.push({
38921
+ name: f.name,
38922
+ type: new basic_1.UnknownType(source.name + " not found, CDSDetermineTypes"),
38923
+ });
38924
+ }
38925
+ else {
38926
+ components.push({
38927
+ name: f.name,
38928
+ type: new basic_1.VoidType(source.name),
38929
+ });
38930
+ }
38931
+ }
38932
+ else {
38933
+ components.push({
38934
+ name: f.name,
38935
+ type: new basic_1.VoidType("DDLS:fieldname:" + ddlsName),
38936
+ });
38937
+ }
38613
38938
  }
38614
- return new basic_1.StructureType(components);
38939
+ return new basic_1.StructureType(components, parsedData.definitionName, parsedData.definitionName, parsedData.description);
38615
38940
  }
38616
38941
  }
38617
38942
  }
@@ -38852,7 +39177,7 @@ const combi_1 = __webpack_require__(/*! ../../abap/2_statements/combi */ "./node
38852
39177
  class CDSAggregate extends combi_1.Expression {
38853
39178
  getRunnable() {
38854
39179
  const name = (0, combi_1.seq)(_1.CDSName, (0, combi_1.opt)((0, combi_1.seq)(".", _1.CDSName)));
38855
- const value = (0, combi_1.alt)(name, _1.CDSCast, _1.CDSCase);
39180
+ const value = (0, combi_1.alt)(name, "*", _1.CDSCast, _1.CDSCase, _1.CDSFunction);
38856
39181
  return (0, combi_1.seq)((0, combi_1.alt)("MAX", "MIN", "SUM", "AVG", "COUNT"), "(", (0, combi_1.opt)("DISTINCT"), value, ")");
38857
39182
  }
38858
39183
  }
@@ -38998,7 +39323,11 @@ class CDSArithmetics extends combi_1.Expression {
38998
39323
  const name = (0, combi_1.seq)(_1.CDSName, (0, combi_1.opt)((0, combi_1.seq)(".", _1.CDSName)));
38999
39324
  const val = (0, combi_1.alt)(cds_integer_1.CDSInteger, name, _1.CDSFunction, _1.CDSCase, _1.CDSCast, _1.CDSString);
39000
39325
  const operator = (0, combi_1.altPrio)("+", "-", "*", "/");
39001
- return (0, combi_1.seq)(val, operator, val);
39326
+ const operatorValue = (0, combi_1.seq)(operator, val);
39327
+ const paren = (0, combi_1.seq)("(", val, (0, combi_1.plus)(operatorValue), ")");
39328
+ const noParen = (0, combi_1.seq)(val, (0, combi_1.plus)(operatorValue));
39329
+ // todo: this is pretty bad, it needs a rewrite
39330
+ return (0, combi_1.altPrio)((0, combi_1.seq)(paren, (0, combi_1.plus)(operatorValue)), paren, noParen);
39002
39331
  }
39003
39332
  }
39004
39333
  exports.CDSArithmetics = CDSArithmetics;
@@ -39114,7 +39443,7 @@ const combi_1 = __webpack_require__(/*! ../../abap/2_statements/combi */ "./node
39114
39443
  class CDSCast extends combi_1.Expression {
39115
39444
  getRunnable() {
39116
39445
  const name = (0, combi_1.seq)(_1.CDSName, (0, combi_1.opt)((0, combi_1.seq)(".", _1.CDSName)));
39117
- return (0, combi_1.seq)("CAST", "(", (0, combi_1.alt)(name, _1.CDSFunction, _1.CDSCase, CDSCast, _1.CDSString, _1.CDSArithmetics), "AS", _1.CDSType, (0, combi_1.opt)((0, combi_1.seq)("PRESERVING", "TYPE")), ")");
39446
+ return (0, combi_1.seq)("CAST", "(", (0, combi_1.alt)(name, _1.CDSFunction, _1.CDSCase, _1.CDSAggregate, CDSCast, _1.CDSString, _1.CDSArithmetics), "AS", _1.CDSType, (0, combi_1.opt)((0, combi_1.seq)("PRESERVING", "TYPE")), ")");
39118
39447
  }
39119
39448
  }
39120
39449
  exports.CDSCast = CDSCast;
@@ -39160,13 +39489,13 @@ const combi_1 = __webpack_require__(/*! ../../abap/2_statements/combi */ "./node
39160
39489
  const cds_integer_1 = __webpack_require__(/*! ./cds_integer */ "./node_modules/@abaplint/core/build/src/cds/expressions/cds_integer.js");
39161
39490
  class CDSCondition extends combi_1.Expression {
39162
39491
  getRunnable() {
39163
- const name = (0, combi_1.seq)(_1.CDSName, (0, combi_1.opt)((0, combi_1.seq)(".", (0, combi_1.alt)(_1.CDSName, _1.CDSString))));
39164
- const left = (0, combi_1.alt)(name, _1.CDSFunction);
39492
+ const name = (0, combi_1.seq)(_1.CDSName, (0, combi_1.optPrio)((0, combi_1.seq)(".", (0, combi_1.alt)(_1.CDSName, _1.CDSString))));
39493
+ const left = (0, combi_1.alt)(name, _1.CDSFunction, _1.CDSString);
39165
39494
  const compare = (0, combi_1.seq)(left, (0, combi_1.alt)("=", (0, combi_1.seq)("!", "="), (0, combi_1.seq)("<", ">"), "<", ">", (0, combi_1.seq)(">", "="), (0, combi_1.seq)("<", "="), "LIKE", "NOT LIKE"), (0, combi_1.alt)(left, cds_integer_1.CDSInteger, _1.CDSFunction, _1.CDSString));
39166
39495
  const is = (0, combi_1.seq)(left, "IS", (0, combi_1.optPrio)("NOT"), (0, combi_1.altPrio)("INITIAL", "NULL"));
39167
- const condition = (0, combi_1.alt)(compare, is);
39496
+ const condition = (0, combi_1.seq)((0, combi_1.optPrio)("NOT"), (0, combi_1.alt)(compare, is));
39168
39497
  const paren = (0, combi_1.seq)("(", CDSCondition, ")");
39169
- return (0, combi_1.seq)((0, combi_1.alt)(condition, paren), (0, combi_1.star)((0, combi_1.seq)((0, combi_1.alt)("AND", "OR"), (0, combi_1.alt)(condition, paren))));
39498
+ return (0, combi_1.seq)((0, combi_1.alt)(condition, paren), (0, combi_1.starPrio)((0, combi_1.seq)((0, combi_1.altPrio)("AND", "OR"), (0, combi_1.altPrio)(condition, paren))));
39170
39499
  }
39171
39500
  }
39172
39501
  exports.CDSCondition = CDSCondition;
@@ -39288,7 +39617,7 @@ const cds_as_1 = __webpack_require__(/*! ./cds_as */ "./node_modules/@abaplint/c
39288
39617
  const cds_cast_1 = __webpack_require__(/*! ./cds_cast */ "./node_modules/@abaplint/core/build/src/cds/expressions/cds_cast.js");
39289
39618
  class CDSElement extends combi_1.Expression {
39290
39619
  getRunnable() {
39291
- return (0, combi_1.seq)((0, combi_1.starPrio)(_1.CDSAnnotation), (0, combi_1.optPrio)("KEY"), (0, combi_1.altPrio)(_1.CDSAggregate, _1.CDSString, _1.CDSFunction, _1.CDSArithmetics, cds_cast_1.CDSCast, _1.CDSCase, (0, combi_1.seq)(_1.CDSName, ": REDIRECTED TO", (0, combi_1.opt)((0, combi_1.alt)("PARENT", "COMPOSITION CHILD")), _1.CDSName), (0, combi_1.seq)(_1.CDSName, (0, combi_1.opt)(_1.CDSParameters), (0, combi_1.star)((0, combi_1.seq)(".", _1.CDSName, (0, combi_1.opt)(_1.CDSParameters)))), (0, combi_1.regex)(/^\d+$/)), (0, combi_1.opt)(cds_as_1.CDSAs));
39620
+ return (0, combi_1.seq)((0, combi_1.starPrio)(_1.CDSAnnotation), (0, combi_1.optPrio)("KEY"), (0, combi_1.altPrio)(_1.CDSAggregate, _1.CDSString, _1.CDSArithmetics, _1.CDSFunction, cds_cast_1.CDSCast, _1.CDSCase, (0, combi_1.seq)(_1.CDSName, ": REDIRECTED TO", (0, combi_1.opt)((0, combi_1.alt)("PARENT", "COMPOSITION CHILD")), _1.CDSName), _1.CDSPrefixedName, (0, combi_1.regex)(/^\d+$/)), (0, combi_1.opt)(cds_as_1.CDSAs));
39292
39621
  }
39293
39622
  }
39294
39623
  exports.CDSElement = CDSElement;
@@ -39335,30 +39664,43 @@ const _1 = __webpack_require__(/*! . */ "./node_modules/@abaplint/core/build/src
39335
39664
  const combi_1 = __webpack_require__(/*! ../../abap/2_statements/combi */ "./node_modules/@abaplint/core/build/src/abap/2_statements/combi.js");
39336
39665
  class CDSFunction extends combi_1.Expression {
39337
39666
  getRunnable() {
39338
- 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))));
39339
- const input = (0, combi_1.altPrio)(_1.CDSCast, CDSFunction, _1.CDSArithmetics, _1.CDSCase, _1.CDSString, qualified, (0, combi_1.regex)(/^\d+$/));
39340
- const coalesce = (0, combi_1.seq)("COALESCE", "(", input, ",", input, ")");
39341
- const concat = (0, combi_1.seq)("CONCAT", "(", input, ",", input, ")");
39342
- const concat_with_space = (0, combi_1.seq)("CONCAT_WITH_SPACE", "(", input, ",", input, ",", input, ")");
39343
- const dats_add_days = (0, combi_1.seq)("DATS_ADD_DAYS", "(", input, ",", input, ",", input, ")");
39344
- const dats_add_months = (0, combi_1.seq)("DATS_ADD_MONTHS", "(", input, ",", input, ",", input, ")");
39345
- const dats_days_between = (0, combi_1.seq)("DATS_DAYS_BETWEEN", "(", input, ",", input, ")");
39346
- const dats_is_valid = (0, combi_1.seq)("DATS_IS_VALID", "(", input, ")");
39347
- const substring = (0, combi_1.seq)("SUBSTRING", "(", input, ",", input, ",", input, ")");
39348
- const bintohex = (0, combi_1.seq)("BINTOHEX", "(", input, ")");
39349
- const hextobin = (0, combi_1.seq)("HEXTOBIN", "(", input, ")");
39350
- const tstmp_to_dats = (0, combi_1.seq)("TSTMP_TO_DATS", "(", input, ",", input, ",", input, ",", input, ")");
39351
- const tstmp_to_tims = (0, combi_1.seq)("TSTMP_TO_TIMS", "(", input, ",", input, ",", input, ",", input, ")");
39352
- const tstmp_to_dst = (0, combi_1.seq)("TSTMP_TO_DST", "(", input, ",", input, ",", input, ",", input, ")");
39353
- const dats_tims_to_tstmp = (0, combi_1.seq)("DATS_TIMS_TO_TSTMP", "(", input, ",", input, ",", input, ",", input, ",", input, ")");
39354
- const tstmp_is_valid = (0, combi_1.seq)("TSTMP_IS_VALID", "(", input, ")");
39667
+ const coalesce = (0, combi_1.seq)("COALESCE", "(", _1.CDSFunctionInput, ",", _1.CDSFunctionInput, ")");
39668
+ const concat = (0, combi_1.seq)("CONCAT", "(", _1.CDSFunctionInput, ",", _1.CDSFunctionInput, ")");
39669
+ const concat_with_space = (0, combi_1.seq)("CONCAT_WITH_SPACE", "(", _1.CDSFunctionInput, ",", _1.CDSFunctionInput, ",", _1.CDSFunctionInput, ")");
39670
+ const dats_add_days = (0, combi_1.seq)("DATS_ADD_DAYS", "(", _1.CDSFunctionInput, ",", _1.CDSFunctionInput, ",", _1.CDSFunctionInput, ")");
39671
+ const dats_add_months = (0, combi_1.seq)("DATS_ADD_MONTHS", "(", _1.CDSFunctionInput, ",", _1.CDSFunctionInput, ",", _1.CDSFunctionInput, ")");
39672
+ const dats_days_between = (0, combi_1.seq)("DATS_DAYS_BETWEEN", "(", _1.CDSFunctionInput, ",", _1.CDSFunctionInput, ")");
39673
+ const dats_is_valid = (0, combi_1.seq)("DATS_IS_VALID", "(", _1.CDSFunctionInput, ")");
39674
+ const substring = (0, combi_1.seq)("SUBSTRING", "(", _1.CDSFunctionInput, ",", _1.CDSFunctionInput, ",", _1.CDSFunctionInput, ")");
39675
+ const bintohex = (0, combi_1.seq)("BINTOHEX", "(", _1.CDSFunctionInput, ")");
39676
+ const hextobin = (0, combi_1.seq)("HEXTOBIN", "(", _1.CDSFunctionInput, ")");
39677
+ const upper = (0, combi_1.seq)("UPPER", "(", _1.CDSFunctionInput, ")");
39678
+ const lower = (0, combi_1.seq)("LOWER", "(", _1.CDSFunctionInput, ")");
39679
+ const abs = (0, combi_1.seq)("ABS", "(", _1.CDSFunctionInput, ")");
39680
+ const ceil = (0, combi_1.seq)("CEIL", "(", _1.CDSFunctionInput, ")");
39681
+ const floor = (0, combi_1.seq)("FLOOR", "(", _1.CDSFunctionInput, ")");
39682
+ const round = (0, combi_1.seq)("ROUND", "(", _1.CDSFunctionInput, ",", _1.CDSFunctionInput, ")");
39683
+ const div = (0, combi_1.seq)("DIV", "(", _1.CDSFunctionInput, ",", _1.CDSFunctionInput, ")");
39684
+ const division = (0, combi_1.seq)("DIVISION", "(", _1.CDSFunctionInput, ",", _1.CDSFunctionInput, ",", _1.CDSFunctionInput, ")");
39685
+ const tstmp_to_dats = (0, combi_1.seq)("TSTMP_TO_DATS", "(", _1.CDSFunctionInput, ",", _1.CDSFunctionInput, ",", _1.CDSFunctionInput, ",", _1.CDSFunctionInput, ")");
39686
+ const tstmp_to_tims = (0, combi_1.seq)("TSTMP_TO_TIMS", "(", _1.CDSFunctionInput, ",", _1.CDSFunctionInput, ",", _1.CDSFunctionInput, ",", _1.CDSFunctionInput, ")");
39687
+ const tstmp_to_dst = (0, combi_1.seq)("TSTMP_TO_DST", "(", _1.CDSFunctionInput, ",", _1.CDSFunctionInput, ",", _1.CDSFunctionInput, ",", _1.CDSFunctionInput, ")");
39688
+ const dats_tims_to_tstmp = (0, combi_1.seq)("DATS_TIMS_TO_TSTMP", "(", _1.CDSFunctionInput, ",", _1.CDSFunctionInput, ",", _1.CDSFunctionInput, ",", _1.CDSFunctionInput, ",", _1.CDSFunctionInput, ")");
39689
+ const tstmp_is_valid = (0, combi_1.seq)("TSTMP_IS_VALID", "(", _1.CDSFunctionInput, ")");
39355
39690
  const tstmp_current_utctimestamp = (0, combi_1.seq)("TSTMP_CURRENT_UTCTIMESTAMP", "(", ")");
39356
- const tstmp_seconds_between = (0, combi_1.seq)("TSTMP_SECONDS_BETWEEN", "(", input, ",", input, ",", input, ")");
39357
- const tstmp_add_seconds = (0, combi_1.seq)("TSTMP_ADD_SECONDS", "(", input, ",", input, ",", input, ")");
39358
- const abap_system_timezone = (0, combi_1.seq)("ABAP_SYSTEM_TIMEZONE", "(", input, ",", input, ")");
39359
- const abap_user_timezone = (0, combi_1.seq)("ABAP_USER_TIMEZONE", "(", input, ",", input, ",", input, ")");
39360
- const mod = (0, combi_1.seq)("MOD", "(", input, ",", input, ")");
39361
- return (0, combi_1.altPrio)(substring, coalesce, tstmp_to_dats, concat, tstmp_to_tims, concat_with_space, dats_is_valid, dats_days_between, tstmp_add_seconds, tstmp_seconds_between, tstmp_current_utctimestamp, tstmp_is_valid, abap_system_timezone, abap_user_timezone, bintohex, hextobin, dats_add_days, dats_add_months, tstmp_to_dst, dats_tims_to_tstmp, mod);
39691
+ const tstmp_seconds_between = (0, combi_1.seq)("TSTMP_SECONDS_BETWEEN", "(", _1.CDSFunctionInput, ",", _1.CDSFunctionInput, ",", _1.CDSFunctionInput, ")");
39692
+ const tstmp_add_seconds = (0, combi_1.seq)("TSTMP_ADD_SECONDS", "(", _1.CDSFunctionInput, ",", _1.CDSFunctionInput, ",", _1.CDSFunctionInput, ")");
39693
+ const abap_system_timezone = (0, combi_1.seq)("ABAP_SYSTEM_TIMEZONE", "(", _1.CDSFunctionInput, ",", _1.CDSFunctionInput, ")");
39694
+ const abap_user_timezone = (0, combi_1.seq)("ABAP_USER_TIMEZONE", "(", _1.CDSFunctionInput, ",", _1.CDSFunctionInput, ",", _1.CDSFunctionInput, ")");
39695
+ const mod = (0, combi_1.seq)("MOD", "(", _1.CDSFunctionInput, ",", _1.CDSFunctionInput, ")");
39696
+ const left = (0, combi_1.seq)("LEFT", "(", _1.CDSFunctionInput, ",", _1.CDSFunctionInput, ")");
39697
+ const right = (0, combi_1.seq)("RIGHT", "(", _1.CDSFunctionInput, ",", _1.CDSFunctionInput, ")");
39698
+ const conversionInput = (0, combi_1.seq)(_1.CDSName, "=", ">", _1.CDSFunctionInput);
39699
+ const conversionInputs = (0, combi_1.seq)(conversionInput, (0, combi_1.starPrio)((0, combi_1.seq)(",", conversionInput)));
39700
+ const unitConversion = (0, combi_1.seq)("UNIT_CONVERSION", "(", conversionInputs, ")");
39701
+ const currencyConversion = (0, combi_1.seq)("CURRENCY_CONVERSION", "(", conversionInputs, ")");
39702
+ const decimalShift = (0, combi_1.seq)("DECIMAL_SHIFT", "(", conversionInputs, ")");
39703
+ return (0, combi_1.altPrio)(substring, coalesce, tstmp_to_dats, concat, tstmp_to_tims, upper, lower, abs, ceil, floor, round, div, division, concat_with_space, dats_is_valid, dats_days_between, tstmp_add_seconds, tstmp_seconds_between, tstmp_current_utctimestamp, tstmp_is_valid, abap_system_timezone, abap_user_timezone, bintohex, hextobin, dats_add_days, dats_add_months, tstmp_to_dst, dats_tims_to_tstmp, mod, left, right, unitConversion, currencyConversion, decimalShift);
39362
39704
  }
39363
39705
  }
39364
39706
  exports.CDSFunction = CDSFunction;
@@ -39366,6 +39708,30 @@ exports.CDSFunction = CDSFunction;
39366
39708
 
39367
39709
  /***/ }),
39368
39710
 
39711
+ /***/ "./node_modules/@abaplint/core/build/src/cds/expressions/cds_function_input.js":
39712
+ /*!*************************************************************************************!*\
39713
+ !*** ./node_modules/@abaplint/core/build/src/cds/expressions/cds_function_input.js ***!
39714
+ \*************************************************************************************/
39715
+ /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
39716
+
39717
+ "use strict";
39718
+
39719
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
39720
+ exports.CDSFunctionInput = void 0;
39721
+ const _1 = __webpack_require__(/*! . */ "./node_modules/@abaplint/core/build/src/cds/expressions/index.js");
39722
+ const combi_1 = __webpack_require__(/*! ../../abap/2_statements/combi */ "./node_modules/@abaplint/core/build/src/abap/2_statements/combi.js");
39723
+ class CDSFunctionInput extends combi_1.Expression {
39724
+ getRunnable() {
39725
+ 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))));
39726
+ const input = (0, combi_1.altPrio)(_1.CDSCast, _1.CDSFunction, _1.CDSArithmetics, _1.CDSCase, _1.CDSString, qualified, (0, combi_1.regex)(/^\d+$/));
39727
+ return input;
39728
+ }
39729
+ }
39730
+ exports.CDSFunctionInput = CDSFunctionInput;
39731
+ //# sourceMappingURL=cds_function_input.js.map
39732
+
39733
+ /***/ }),
39734
+
39369
39735
  /***/ "./node_modules/@abaplint/core/build/src/cds/expressions/cds_group_by.js":
39370
39736
  /*!*******************************************************************************!*\
39371
39737
  !*** ./node_modules/@abaplint/core/build/src/cds/expressions/cds_group_by.js ***!
@@ -39526,6 +39892,29 @@ exports.CDSParametersSelect = CDSParametersSelect;
39526
39892
 
39527
39893
  /***/ }),
39528
39894
 
39895
+ /***/ "./node_modules/@abaplint/core/build/src/cds/expressions/cds_prefixed_name.js":
39896
+ /*!************************************************************************************!*\
39897
+ !*** ./node_modules/@abaplint/core/build/src/cds/expressions/cds_prefixed_name.js ***!
39898
+ \************************************************************************************/
39899
+ /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
39900
+
39901
+ "use strict";
39902
+
39903
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
39904
+ exports.CDSPrefixedName = void 0;
39905
+ const combi_1 = __webpack_require__(/*! ../../abap/2_statements/combi */ "./node_modules/@abaplint/core/build/src/abap/2_statements/combi.js");
39906
+ const cds_name_1 = __webpack_require__(/*! ./cds_name */ "./node_modules/@abaplint/core/build/src/cds/expressions/cds_name.js");
39907
+ const cds_parameters_1 = __webpack_require__(/*! ./cds_parameters */ "./node_modules/@abaplint/core/build/src/cds/expressions/cds_parameters.js");
39908
+ class CDSPrefixedName extends combi_1.Expression {
39909
+ getRunnable() {
39910
+ return (0, combi_1.seq)(cds_name_1.CDSName, (0, combi_1.opt)(cds_parameters_1.CDSParameters), (0, combi_1.star)((0, combi_1.seq)(".", cds_name_1.CDSName, (0, combi_1.opt)(cds_parameters_1.CDSParameters))));
39911
+ }
39912
+ }
39913
+ exports.CDSPrefixedName = CDSPrefixedName;
39914
+ //# sourceMappingURL=cds_prefixed_name.js.map
39915
+
39916
+ /***/ }),
39917
+
39529
39918
  /***/ "./node_modules/@abaplint/core/build/src/cds/expressions/cds_provider_contract.js":
39530
39919
  /*!****************************************************************************************!*\
39531
39920
  !*** ./node_modules/@abaplint/core/build/src/cds/expressions/cds_provider_contract.js ***!
@@ -39586,10 +39975,10 @@ const cds_association_1 = __webpack_require__(/*! ./cds_association */ "./node_m
39586
39975
  const cds_join_1 = __webpack_require__(/*! ./cds_join */ "./node_modules/@abaplint/core/build/src/cds/expressions/cds_join.js");
39587
39976
  class CDSSelect extends combi_1.Expression {
39588
39977
  getRunnable() {
39589
- const fields = (0, combi_1.opt)((0, combi_1.seq)((0, combi_1.star)((0, combi_1.seq)(_1.CDSElement, ",")), _1.CDSElement));
39978
+ const fields = (0, combi_1.seq)((0, combi_1.star)((0, combi_1.seq)(_1.CDSElement, ",")), _1.CDSElement);
39590
39979
  const distinct = (0, combi_1.str)("DISTINCT");
39591
- const elements = (0, combi_1.seq)((0, combi_1.str)("{"), (0, combi_1.plus)(_1.CDSElement), (0, combi_1.star)((0, combi_1.seq)(",", _1.CDSElement)), (0, combi_1.str)("}"));
39592
- return (0, combi_1.seq)("SELECT", (0, combi_1.opt)(distinct), (0, combi_1.opt)(fields), "FROM", _1.CDSSource, (0, combi_1.opt)(_1.CDSParametersSelect), (0, combi_1.opt)(_1.CDSAs), (0, combi_1.star)(cds_join_1.CDSJoin), (0, combi_1.star)(_1.CDSComposition), (0, combi_1.star)(cds_association_1.CDSAssociation), (0, combi_1.star)(_1.CDSComposition), (0, combi_1.opt)(elements), (0, combi_1.opt)(_1.CDSWhere), (0, combi_1.opt)(_1.CDSGroupBy), (0, combi_1.opt)(_1.CDSHaving), (0, combi_1.opt)((0, combi_1.seq)("UNION", (0, combi_1.opt)("ALL"), CDSSelect)));
39980
+ const elements = (0, combi_1.seq)((0, combi_1.str)("{"), _1.CDSElement, (0, combi_1.starPrio)((0, combi_1.seq)(",", _1.CDSElement)), (0, combi_1.str)("}"));
39981
+ return (0, combi_1.seq)("SELECT", (0, combi_1.optPrio)(distinct), (0, combi_1.opt)(fields), "FROM", _1.CDSSource, (0, combi_1.star)(cds_join_1.CDSJoin), (0, combi_1.star)(_1.CDSComposition), (0, combi_1.star)(cds_association_1.CDSAssociation), (0, combi_1.star)(_1.CDSComposition), (0, combi_1.opt)(elements), (0, combi_1.optPrio)(_1.CDSWhere), (0, combi_1.optPrio)(_1.CDSGroupBy), (0, combi_1.optPrio)(_1.CDSHaving), (0, combi_1.optPrio)((0, combi_1.seq)("UNION", (0, combi_1.optPrio)("ALL"), CDSSelect)));
39593
39982
  }
39594
39983
  }
39595
39984
  exports.CDSSelect = CDSSelect;
@@ -39611,8 +40000,7 @@ const _1 = __webpack_require__(/*! . */ "./node_modules/@abaplint/core/build/src
39611
40000
  const combi_1 = __webpack_require__(/*! ../../abap/2_statements/combi */ "./node_modules/@abaplint/core/build/src/abap/2_statements/combi.js");
39612
40001
  class CDSSource extends combi_1.Expression {
39613
40002
  getRunnable() {
39614
- const pre = (0, combi_1.seq)("/", (0, combi_1.regex)(/^[\w_]+$/), "/");
39615
- return (0, combi_1.seq)((0, combi_1.opt)(pre), (0, combi_1.regex)(/^[\w_]+$/), (0, combi_1.opt)(_1.CDSAs));
40003
+ return (0, combi_1.seq)(_1.CDSName, (0, combi_1.opt)(_1.CDSParametersSelect), (0, combi_1.opt)(_1.CDSAs));
39616
40004
  }
39617
40005
  }
39618
40006
  exports.CDSSource = CDSSource;
@@ -39633,7 +40021,8 @@ exports.CDSString = void 0;
39633
40021
  const combi_1 = __webpack_require__(/*! ../../abap/2_statements/combi */ "./node_modules/@abaplint/core/build/src/abap/2_statements/combi.js");
39634
40022
  class CDSString extends combi_1.Expression {
39635
40023
  getRunnable() {
39636
- return (0, combi_1.regex)(/^'[\w: -_]*'$/);
40024
+ // https://stackoverflow.com/a/57754227
40025
+ return (0, combi_1.regex)(/^'[A-Za-zÀ-ž\u0370-\u03FF\u0400-\u04FF: -_]*'$/);
39637
40026
  }
39638
40027
  }
39639
40028
  exports.CDSString = CDSString;
@@ -39753,6 +40142,7 @@ __exportStar(__webpack_require__(/*! ./cds_define_view */ "./node_modules/@abapl
39753
40142
  __exportStar(__webpack_require__(/*! ./cds_element */ "./node_modules/@abaplint/core/build/src/cds/expressions/cds_element.js"), exports);
39754
40143
  __exportStar(__webpack_require__(/*! ./cds_extend_view */ "./node_modules/@abaplint/core/build/src/cds/expressions/cds_extend_view.js"), exports);
39755
40144
  __exportStar(__webpack_require__(/*! ./cds_function */ "./node_modules/@abaplint/core/build/src/cds/expressions/cds_function.js"), exports);
40145
+ __exportStar(__webpack_require__(/*! ./cds_function_input */ "./node_modules/@abaplint/core/build/src/cds/expressions/cds_function_input.js"), exports);
39756
40146
  __exportStar(__webpack_require__(/*! ./cds_group_by */ "./node_modules/@abaplint/core/build/src/cds/expressions/cds_group_by.js"), exports);
39757
40147
  __exportStar(__webpack_require__(/*! ./cds_having */ "./node_modules/@abaplint/core/build/src/cds/expressions/cds_having.js"), exports);
39758
40148
  __exportStar(__webpack_require__(/*! ./cds_integer */ "./node_modules/@abaplint/core/build/src/cds/expressions/cds_integer.js"), exports);
@@ -39760,6 +40150,7 @@ __exportStar(__webpack_require__(/*! ./cds_join */ "./node_modules/@abaplint/cor
39760
40150
  __exportStar(__webpack_require__(/*! ./cds_name */ "./node_modules/@abaplint/core/build/src/cds/expressions/cds_name.js"), exports);
39761
40151
  __exportStar(__webpack_require__(/*! ./cds_parameters_select */ "./node_modules/@abaplint/core/build/src/cds/expressions/cds_parameters_select.js"), exports);
39762
40152
  __exportStar(__webpack_require__(/*! ./cds_parameters */ "./node_modules/@abaplint/core/build/src/cds/expressions/cds_parameters.js"), exports);
40153
+ __exportStar(__webpack_require__(/*! ./cds_prefixed_name */ "./node_modules/@abaplint/core/build/src/cds/expressions/cds_prefixed_name.js"), exports);
39763
40154
  __exportStar(__webpack_require__(/*! ./cds_provider_contract */ "./node_modules/@abaplint/core/build/src/cds/expressions/cds_provider_contract.js"), exports);
39764
40155
  __exportStar(__webpack_require__(/*! ./cds_relation */ "./node_modules/@abaplint/core/build/src/cds/expressions/cds_relation.js"), exports);
39765
40156
  __exportStar(__webpack_require__(/*! ./cds_select */ "./node_modules/@abaplint/core/build/src/cds/expressions/cds_select.js"), exports);
@@ -40135,10 +40526,10 @@ class DDIC {
40135
40526
  return { type: new Types.VoidType(name) };
40136
40527
  }
40137
40528
  }
40138
- lookupDomain(name, dataElement) {
40529
+ lookupDomain(name, dataElement, description) {
40139
40530
  const found = this.reg.getObject("DOMA", name);
40140
40531
  if (found) {
40141
- return { type: found.parseType(this.reg, dataElement), object: found };
40532
+ return { type: found.parseType(this.reg, dataElement, description), object: found };
40142
40533
  }
40143
40534
  else if (this.reg.inErrorNamespace(name)) {
40144
40535
  return { type: new Types.UnknownType(name + ", lookupDomain"), object: undefined };
@@ -40240,9 +40631,15 @@ class DDIC {
40240
40631
  return { type: new Types.VoidType(name) };
40241
40632
  }
40242
40633
  }
40243
- textToType(text, length, decimals, infoText, qualifiedName, conversionExit, ddicName) {
40634
+ textToType(input) {
40244
40635
  // todo: support short strings, and length of different integers, NUMC vs CHAR, min/max length
40245
- switch (text) {
40636
+ const extra = {
40637
+ qualifiedName: input.qualifiedName,
40638
+ conversionExit: input.conversionExit,
40639
+ ddicName: input.ddicName,
40640
+ description: input.description,
40641
+ };
40642
+ switch (input.text) {
40246
40643
  case "DEC": // 1 <= len <= 31
40247
40644
  case "D16F": // 1 <= len <= 31
40248
40645
  case "D16D":
@@ -40251,45 +40648,45 @@ class DDIC {
40251
40648
  case "DF34_DEC": // 1 <= len <= 31
40252
40649
  case "CURR": // 1 <= len <= 31
40253
40650
  case "QUAN": // 1 <= len <= 31
40254
- if (length === undefined) {
40255
- return new Types.UnknownType(text + " unknown length, " + infoText, infoText);
40651
+ if (input.length === undefined) {
40652
+ return new Types.UnknownType(input.text + " unknown length, " + input.infoText, input.infoText);
40256
40653
  }
40257
- else if (decimals === undefined) {
40258
- return new Types.PackedType(parseInt(length, 10), 0, { qualifiedName, conversionExit, ddicName });
40654
+ else if (input.decimals === undefined) {
40655
+ return new Types.PackedType(parseInt(input.length, 10), 0, extra);
40259
40656
  }
40260
- return new Types.PackedType(parseInt(length, 10), parseInt(decimals, 10), { qualifiedName, conversionExit, ddicName });
40657
+ return new Types.PackedType(parseInt(input.length, 10), parseInt(input.decimals, 10), extra);
40261
40658
  case "ACCP":
40262
- return new Types.CharacterType(6, { qualifiedName, conversionExit, ddicName }); // YYYYMM
40659
+ return new Types.CharacterType(6, extra); // YYYYMM
40263
40660
  case "LANG":
40264
- return new Types.CharacterType(1, { qualifiedName, conversionExit, ddicName });
40661
+ return new Types.CharacterType(1, extra);
40265
40662
  case "CLNT":
40266
- return new Types.CharacterType(3, { qualifiedName, conversionExit, ddicName });
40663
+ return new Types.CharacterType(3, extra);
40267
40664
  case "CUKY":
40268
- return new Types.CharacterType(5, { qualifiedName, conversionExit, ddicName });
40665
+ return new Types.CharacterType(5, extra);
40269
40666
  case "UNIT": // 2 <= len <= 3
40270
- return new Types.CharacterType(3, { qualifiedName, conversionExit, ddicName });
40667
+ return new Types.CharacterType(3, extra);
40271
40668
  case "UTCLONG":
40272
- return new Types.CharacterType(27, { qualifiedName, conversionExit, ddicName });
40669
+ return new Types.CharacterType(27, extra);
40273
40670
  case "NUMC": // 1 <= len <= 255
40274
- if (length === undefined) {
40275
- return new Types.UnknownType(text + " unknown length", infoText);
40671
+ if (input.length === undefined) {
40672
+ return new Types.UnknownType(input.text + " unknown length", input.infoText);
40276
40673
  }
40277
- return new Types.NumericType(parseInt(length, 10), qualifiedName);
40674
+ return new Types.NumericType(parseInt(input.length, 10), input.qualifiedName);
40278
40675
  case "CHAR": // 1 <= len <= 30000 (1333 for table fields)
40279
40676
  case "LCHR": // 256 <= len <= 32000
40280
- if (length === undefined) {
40281
- return new Types.UnknownType(text + " unknown length", infoText);
40677
+ if (input.length === undefined) {
40678
+ return new Types.UnknownType(input.text + " unknown length", input.infoText);
40282
40679
  }
40283
- return new Types.CharacterType(parseInt(length, 10), { qualifiedName, conversionExit, ddicName });
40680
+ return new Types.CharacterType(parseInt(input.length, 10), extra);
40284
40681
  case "RAW": // 1 <= len <= 32000
40285
40682
  case "LRAW": // 256 <= len <= 32000
40286
- if (length === undefined) {
40287
- return new Types.UnknownType(text + " unknown length", infoText);
40683
+ if (input.length === undefined) {
40684
+ return new Types.UnknownType(input.text + " unknown length", input.infoText);
40288
40685
  }
40289
- return new Types.HexType(parseInt(length, 10), qualifiedName);
40686
+ return new Types.HexType(parseInt(input.length, 10), input.qualifiedName);
40290
40687
  case "TIMN": // Native HANA
40291
40688
  case "TIMS":
40292
- return new Types.TimeType({ qualifiedName: qualifiedName }); //HHMMSS
40689
+ return new Types.TimeType({ qualifiedName: input.qualifiedName }); //HHMMSS
40293
40690
  case "DECFLOAT16": // len = 16
40294
40691
  case "DECFLOAT34": // len = 34
40295
40692
  case "D16R": // len = 16
@@ -40297,37 +40694,37 @@ class DDIC {
40297
40694
  case "DF16_RAW": // len = 16
40298
40695
  case "DF34_RAW": // len = 34
40299
40696
  case "FLTP": // len = 16
40300
- if (length === undefined) {
40301
- return new Types.UnknownType(text + " unknown length", infoText);
40697
+ if (input.length === undefined) {
40698
+ return new Types.UnknownType(input.text + " unknown length", input.infoText);
40302
40699
  }
40303
- return new Types.FloatingPointType(parseInt(length, 10), qualifiedName);
40700
+ return new Types.FloatingPointType(parseInt(input.length, 10), input.qualifiedName);
40304
40701
  case "DATN": // Native HANA
40305
40702
  case "DATS":
40306
- return new Types.DateType({ qualifiedName: qualifiedName }); //YYYYMMDD
40703
+ return new Types.DateType({ qualifiedName: input.qualifiedName }); //YYYYMMDD
40307
40704
  case "INT1":
40308
40705
  case "INT2":
40309
40706
  case "INT4":
40310
- return Types.IntegerType.get({ qualifiedName: qualifiedName });
40707
+ return Types.IntegerType.get({ qualifiedName: input.qualifiedName });
40311
40708
  case "INT8":
40312
- return new Types.Integer8Type({ qualifiedName: qualifiedName });
40709
+ return new Types.Integer8Type({ qualifiedName: input.qualifiedName });
40313
40710
  case "SSTR": // 1 <= len <= 1333
40314
40711
  case "SSTRING": // 1 <= len <= 1333
40315
40712
  case "STRG": // 256 <= len
40316
40713
  case "STRING": // 256 <= len
40317
- return Types.StringType.get({ qualifiedName: qualifiedName });
40714
+ return Types.StringType.get({ qualifiedName: input.qualifiedName });
40318
40715
  case "RSTR": // 256 <= len
40319
40716
  case "RAWSTRING": // 256 <= len
40320
40717
  case "GEOM_EWKB":
40321
- return new Types.XStringType({ qualifiedName: qualifiedName });
40718
+ return new Types.XStringType({ qualifiedName: input.qualifiedName });
40322
40719
  case "D16S":
40323
40720
  case "D34S":
40324
40721
  case "DF16_SCL":
40325
40722
  case "DF34_SCL":
40326
40723
  case "PREC":
40327
40724
  case "VARC":
40328
- return new Types.UnknownType(text + " is an obsolete data type", infoText);
40725
+ return new Types.UnknownType(input.text + " is an obsolete data type", input.infoText);
40329
40726
  default:
40330
- return new Types.UnknownType(text + " unknown", infoText);
40727
+ return new Types.UnknownType(input.text + " unknown", input.infoText);
40331
40728
  }
40332
40729
  }
40333
40730
  }
@@ -41622,6 +42019,9 @@ class LSPLookup {
41622
42019
  if (variable.getType().getDDICName() !== undefined) {
41623
42020
  value += "\n\nDDIC Name: ```" + variable.getType().getDDICName() + "```";
41624
42021
  }
42022
+ if (variable.getType().getDescription() !== undefined) {
42023
+ value += "\n\nDescription: " + variable.getType().getDescription();
42024
+ }
41625
42025
  return value;
41626
42026
  }
41627
42027
  static referenceHover(ref, scope, reg) {
@@ -42158,15 +42558,13 @@ exports.Definition = Definition;
42158
42558
  Object.defineProperty(exports, "__esModule", ({ value: true }));
42159
42559
  exports.Diagnostics = void 0;
42160
42560
  const LServer = __webpack_require__(/*! vscode-languageserver-types */ "./node_modules/vscode-languageserver-types/lib/umd/main.js");
42161
- const _lsp_utils_1 = __webpack_require__(/*! ./_lsp_utils */ "./node_modules/@abaplint/core/build/src/lsp/_lsp_utils.js");
42162
42561
  const severity_1 = __webpack_require__(/*! ../severity */ "./node_modules/@abaplint/core/build/src/severity.js");
42163
42562
  class Diagnostics {
42164
42563
  constructor(reg) {
42165
42564
  this.reg = reg;
42166
42565
  }
42167
42566
  findIssues(textDocument) {
42168
- this.reg.parse();
42169
- const file = _lsp_utils_1.LSPUtils.getABAPFile(this.reg, textDocument.uri); // todo, this sould also run for xml files
42567
+ const file = this.reg.getFileByName(textDocument.uri);
42170
42568
  if (file === undefined) {
42171
42569
  return [];
42172
42570
  }
@@ -42174,6 +42572,7 @@ class Diagnostics {
42174
42572
  if (obj === undefined) {
42175
42573
  return [];
42176
42574
  }
42575
+ this.reg.parse();
42177
42576
  let issues = this.reg.findIssuesObject(obj);
42178
42577
  issues = issues.filter(i => i.getFilename() === file.getFilename());
42179
42578
  return issues;
@@ -42338,6 +42737,7 @@ const _lsp_utils_1 = __webpack_require__(/*! ./_lsp_utils */ "./node_modules/@ab
42338
42737
  const syntax_1 = __webpack_require__(/*! ../abap/5_syntax/syntax */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/syntax.js");
42339
42738
  const _abap_object_1 = __webpack_require__(/*! ../objects/_abap_object */ "./node_modules/@abaplint/core/build/src/objects/_abap_object.js");
42340
42739
  const dump_scope_1 = __webpack_require__(/*! ./dump_scope */ "./node_modules/@abaplint/core/build/src/lsp/dump_scope.js");
42740
+ const virtual_position_1 = __webpack_require__(/*! ../virtual_position */ "./node_modules/@abaplint/core/build/src/virtual_position.js");
42341
42741
  class Help {
42342
42742
  static find(reg, textDocument, position) {
42343
42743
  const file = _lsp_utils_1.LSPUtils.getABAPFile(reg, textDocument.uri);
@@ -42512,13 +42912,24 @@ class Help {
42512
42912
  return ret + "</ul>";
42513
42913
  }
42514
42914
  static tokens(file) {
42515
- let inner = "<table><tr><td><b>String</b></td><td><b>Type</b></td><td><b>Row</b></td><td><b>Column</b></td></tr>";
42915
+ let inner = `<table><tr><td><b>String</b></td><td><b>Type</b></td>
42916
+ <td><b>Row</b></td><td><b>Column</b></td>
42917
+ <td><b>vRow</b></td><td><b>vColumn</b></td>
42918
+ </tr>`;
42516
42919
  for (const token of file.getTokens()) {
42517
- inner = inner + "<tr><td><tt>" +
42920
+ const tStart = token.getStart();
42921
+ inner += "<tr><td><tt>" +
42518
42922
  this.escape(token.getStr()) + "</tt></td><td>" +
42519
42923
  token.constructor.name + "</td><td align=\"right\">" +
42520
- token.getRow() + "</td><td align=\"right\">" +
42521
- token.getCol() + "</td></tr>";
42924
+ tStart.getRow() + "</td><td align=\"right\">" +
42925
+ tStart.getCol() + "</td>";
42926
+ if (tStart instanceof virtual_position_1.VirtualPosition) {
42927
+ inner += `<td>${tStart.vcol}</td><td>${tStart.vrow}</td>`;
42928
+ }
42929
+ else {
42930
+ inner += "<td></td><td></td>";
42931
+ }
42932
+ inner += "</tr>";
42522
42933
  }
42523
42934
  inner = inner + "</table>";
42524
42935
  return inner;
@@ -42852,7 +43263,8 @@ class InlayHints {
42852
43263
  findImplicitReferences(node) {
42853
43264
  const ret = [];
42854
43265
  for (const r of node.getData().references) {
42855
- if (r.referenceType === _reference_1.ReferenceType.InferredType) {
43266
+ if (r.referenceType === _reference_1.ReferenceType.InferredType ||
43267
+ r.referenceType === _reference_1.ReferenceType.DataWriteReference) {
42856
43268
  ret.push(r);
42857
43269
  }
42858
43270
  }
@@ -45445,12 +45857,13 @@ class DataDefinition extends _abstract_object_1.AbstractObject {
45445
45857
  return (_a = this.parsedData) === null || _a === void 0 ? void 0 : _a.definitionName;
45446
45858
  }
45447
45859
  getDescription() {
45448
- // todo
45449
- return undefined;
45860
+ var _a;
45861
+ this.parse();
45862
+ return (_a = this.parsedData) === null || _a === void 0 ? void 0 : _a.description;
45450
45863
  }
45451
45864
  parseType(reg) {
45452
45865
  this.parse();
45453
- return new cds_determine_types_1.CDSDetermineTypes().parseType(reg, this.parsedData);
45866
+ return new cds_determine_types_1.CDSDetermineTypes().parseType(reg, this.parsedData, this.getName());
45454
45867
  }
45455
45868
  getParsedData() {
45456
45869
  return this.parsedData;
@@ -45471,6 +45884,17 @@ class DataDefinition extends _abstract_object_1.AbstractObject {
45471
45884
  hasParserError() {
45472
45885
  return this.parserError;
45473
45886
  }
45887
+ listKeys() {
45888
+ var _a;
45889
+ this.parse();
45890
+ const ret = [];
45891
+ for (const field of ((_a = this.parsedData) === null || _a === void 0 ? void 0 : _a.fields) || []) {
45892
+ if (field.key === true) {
45893
+ ret.push(field.name);
45894
+ }
45895
+ }
45896
+ return ret;
45897
+ }
45474
45898
  parse() {
45475
45899
  var _a, _b;
45476
45900
  if (this.isDirty() === false) {
@@ -45480,6 +45904,7 @@ class DataDefinition extends _abstract_object_1.AbstractObject {
45480
45904
  this.parsedData = {
45481
45905
  sqlViewName: undefined,
45482
45906
  definitionName: undefined,
45907
+ description: this.findDescription(),
45483
45908
  fields: [],
45484
45909
  sources: [],
45485
45910
  relations: [],
@@ -45514,11 +45939,19 @@ class DataDefinition extends _abstract_object_1.AbstractObject {
45514
45939
  //////////
45515
45940
  findSQLViewName() {
45516
45941
  var _a;
45517
- const match = (_a = this.findSourceFile()) === null || _a === void 0 ? void 0 : _a.getRaw().match(/@AbapCatalog\.sqlViewName: '(\w+)'/);
45942
+ const match = (_a = this.findSourceFile()) === null || _a === void 0 ? void 0 : _a.getRaw().match(/@AbapCatalog\.sqlViewName: '([\w/]+)'/);
45518
45943
  if (match) {
45519
45944
  this.parsedData.sqlViewName = match[1].toUpperCase();
45520
45945
  }
45521
45946
  }
45947
+ findDescription() {
45948
+ var _a;
45949
+ const match = (_a = this.findSourceFile()) === null || _a === void 0 ? void 0 : _a.getRaw().match(/@EndUserText\.label: '([\w,.:-=#%&() ]+)'/);
45950
+ if (match) {
45951
+ return match[1];
45952
+ }
45953
+ return undefined;
45954
+ }
45522
45955
  findFieldNames(tree) {
45523
45956
  var _a, _b;
45524
45957
  let expr = tree.findFirstExpression(expressions_1.CDSSelect);
@@ -45529,14 +45962,18 @@ class DataDefinition extends _abstract_object_1.AbstractObject {
45529
45962
  expr = tree.findFirstExpression(expressions_1.CDSDefineProjection);
45530
45963
  }
45531
45964
  for (const e of (expr === null || expr === void 0 ? void 0 : expr.findDirectExpressions(expressions_1.CDSElement)) || []) {
45965
+ let prefix = "";
45532
45966
  let found = (_a = e.findDirectExpression(expressions_1.CDSAs)) === null || _a === void 0 ? void 0 : _a.findDirectExpression(expressions_1.CDSName);
45533
45967
  if (found === undefined) {
45534
- const list = e.findDirectExpressions(expressions_1.CDSName);
45968
+ const list = e.findAllExpressions(expressions_1.CDSName);
45535
45969
  if (e.concatTokens().toUpperCase().includes(" REDIRECTED TO ")) {
45536
45970
  found = list[0];
45537
45971
  }
45538
45972
  else {
45539
45973
  found = list[list.length - 1];
45974
+ if (list.length > 1) {
45975
+ prefix = list[0].concatTokens();
45976
+ }
45540
45977
  }
45541
45978
  }
45542
45979
  if (found === undefined) {
@@ -45553,20 +45990,21 @@ class DataDefinition extends _abstract_object_1.AbstractObject {
45553
45990
  this.parsedData.fields.push({
45554
45991
  name: name,
45555
45992
  annotations: annotations,
45993
+ prefix: prefix,
45556
45994
  key: e.findDirectTokenByText("KEY") !== undefined,
45557
45995
  });
45558
45996
  }
45559
45997
  }
45560
45998
  findSourcesAndRelations(tree) {
45561
- var _a, _b, _c, _d, _e, _f;
45999
+ var _a, _b, _c, _d, _e, _f, _g;
45562
46000
  for (const e of tree.findAllExpressions(expressions_1.CDSSource)) {
45563
- const name = e.getFirstToken().getStr();
45564
- const as = (_b = (_a = e.findDirectExpression(expressions_1.CDSAs)) === null || _a === void 0 ? void 0 : _a.findDirectExpression(expressions_1.CDSName)) === null || _b === void 0 ? void 0 : _b.getFirstToken().getStr();
46001
+ const name = ((_a = e.getFirstChild()) === null || _a === void 0 ? void 0 : _a.concatTokens().toUpperCase().replace(/ /g, "")) || "ERROR";
46002
+ const as = (_c = (_b = e.findDirectExpression(expressions_1.CDSAs)) === null || _b === void 0 ? void 0 : _b.findDirectExpression(expressions_1.CDSName)) === null || _c === void 0 ? void 0 : _c.concatTokens().toUpperCase();
45565
46003
  this.parsedData.sources.push({ name, as });
45566
46004
  }
45567
46005
  for (const e of tree.findAllExpressions(expressions_1.CDSRelation)) {
45568
46006
  const name = e.getFirstToken().getStr();
45569
- const as = (_d = (_c = e.findDirectExpression(expressions_1.CDSAs)) === null || _c === void 0 ? void 0 : _c.findDirectExpression(expressions_1.CDSName)) === null || _d === void 0 ? void 0 : _d.getFirstToken().getStr();
46007
+ const as = (_e = (_d = e.findDirectExpression(expressions_1.CDSAs)) === null || _d === void 0 ? void 0 : _d.findDirectExpression(expressions_1.CDSName)) === null || _e === void 0 ? void 0 : _e.getFirstToken().getStr();
45570
46008
  this.parsedData.relations.push({ name, as });
45571
46009
  }
45572
46010
  for (const e of tree.findAllExpressions(expressions_1.CDSAssociation)) {
@@ -45575,7 +46013,7 @@ class DataDefinition extends _abstract_object_1.AbstractObject {
45575
46013
  continue;
45576
46014
  }
45577
46015
  const name = j.getFirstToken().getStr();
45578
- const as = (_f = (_e = j.findDirectExpression(expressions_1.CDSAs)) === null || _e === void 0 ? void 0 : _e.findDirectExpression(expressions_1.CDSName)) === null || _f === void 0 ? void 0 : _f.getFirstToken().getStr();
46016
+ const as = (_g = (_f = j.findDirectExpression(expressions_1.CDSAs)) === null || _f === void 0 ? void 0 : _f.findDirectExpression(expressions_1.CDSName)) === null || _g === void 0 ? void 0 : _g.getFirstToken().getStr();
45579
46017
  this.parsedData.associations.push({
45580
46018
  name: name || "ERROR",
45581
46019
  as: as,
@@ -45635,6 +46073,7 @@ class DataElement extends _abstract_object_1.AbstractObject {
45635
46073
  return (_a = this.parsedXML) === null || _a === void 0 ? void 0 : _a.texts;
45636
46074
  }
45637
46075
  parseType(reg) {
46076
+ var _a;
45638
46077
  const references = [];
45639
46078
  let lookup = undefined;
45640
46079
  if (this.parsedXML === undefined) {
@@ -45647,7 +46086,7 @@ class DataElement extends _abstract_object_1.AbstractObject {
45647
46086
  lookup = { type: new Types.UnknownType("DOMNAME unexpectely empty in " + this.getName()) };
45648
46087
  }
45649
46088
  else {
45650
- lookup = ddic.lookupDomain(this.parsedXML.domname, this.getName());
46089
+ lookup = ddic.lookupDomain(this.parsedXML.domname, this.getName(), this.getDescription());
45651
46090
  }
45652
46091
  }
45653
46092
  else if (this.parsedXML.refkind === "R") {
@@ -45663,7 +46102,16 @@ class DataElement extends _abstract_object_1.AbstractObject {
45663
46102
  lookup = { type: new Types.UnknownType("DATATYPE unexpectely empty in " + this.getName()) };
45664
46103
  }
45665
46104
  else {
45666
- lookup = { type: ddic.textToType(this.parsedXML.datatype, this.parsedXML.leng, this.parsedXML.decimals, this.getName(), this.getName(), undefined, this.getName()) };
46105
+ lookup = { type: ddic.textToType({
46106
+ text: this.parsedXML.datatype,
46107
+ length: this.parsedXML.leng,
46108
+ decimals: this.parsedXML.decimals,
46109
+ infoText: this.getName(),
46110
+ qualifiedName: this.getName(),
46111
+ conversionExit: undefined,
46112
+ ddicName: this.getName(),
46113
+ description: (_a = this.parsedXML.texts) === null || _a === void 0 ? void 0 : _a.heading,
46114
+ }) };
45667
46115
  }
45668
46116
  }
45669
46117
  }
@@ -45806,7 +46254,7 @@ class Domain extends _abstract_object_1.AbstractObject {
45806
46254
  this.parsedXML = undefined;
45807
46255
  super.setDirty();
45808
46256
  }
45809
- parseType(reg, dataElement) {
46257
+ parseType(reg, dataElement, description) {
45810
46258
  // dont cache the DOMA parsed type, they are cached on DTEL level
45811
46259
  // also note that the type carries the name of the DTEL
45812
46260
  if (this.parsedXML === undefined) {
@@ -45816,7 +46264,16 @@ class Domain extends _abstract_object_1.AbstractObject {
45816
46264
  return new Types.UnknownType("Domain " + this.getName() + " parser error", this.getName());
45817
46265
  }
45818
46266
  const ddic = new ddic_1.DDIC(reg);
45819
- return ddic.textToType(this.parsedXML.datatype, this.parsedXML.length, this.parsedXML.decimals, this.getName(), dataElement, this.parsedXML.conversionExit, dataElement);
46267
+ return ddic.textToType({
46268
+ text: this.parsedXML.datatype,
46269
+ length: this.parsedXML.length,
46270
+ decimals: this.parsedXML.decimals,
46271
+ infoText: this.getName(),
46272
+ qualifiedName: dataElement,
46273
+ conversionExit: this.parsedXML.conversionExit,
46274
+ ddicName: dataElement,
46275
+ description: description,
46276
+ });
45820
46277
  }
45821
46278
  parse() {
45822
46279
  var _a, _b, _c, _d, _e, _f, _g;
@@ -49617,6 +50074,9 @@ class RenamerHelper {
49617
50074
  let ret = [];
49618
50075
  if (node.getIdentifier().stype !== _scope_type_1.ScopeType.BuiltIn) {
49619
50076
  for (const r of node.getData().references) {
50077
+ if (r.referenceType === __1.ReferenceType.ConstructorReference) {
50078
+ continue;
50079
+ }
49620
50080
  if (((_a = r.resolved) === null || _a === void 0 ? void 0 : _a.equals(identifier))
49621
50081
  && r.referenceType !== __1.ReferenceType.InferredType
49622
50082
  && !(r.position.getStart() instanceof virtual_position_1.VirtualPosition)) {
@@ -50120,7 +50580,7 @@ const version_1 = __webpack_require__(/*! ../version */ "./node_modules/@abaplin
50120
50580
  var EnhancementCategory;
50121
50581
  (function (EnhancementCategory) {
50122
50582
  EnhancementCategory["NotClassified"] = "0";
50123
- EnhancementCategory["CannotBeEhanced"] = "1";
50583
+ EnhancementCategory["CannotBeEnhanced"] = "1";
50124
50584
  EnhancementCategory["Character"] = "2";
50125
50585
  EnhancementCategory["CharacterOrNumeric"] = "3";
50126
50586
  EnhancementCategory["Deep"] = "4";
@@ -50208,9 +50668,10 @@ class Table extends _abstract_object_1.AbstractObject {
50208
50668
  references.push({ object: lookup.object });
50209
50669
  }
50210
50670
  }
50211
- else if (field.FIELDNAME === ".INCLUDE" || field.FIELDNAME === ".INCLU--AP") { // incude or append structure
50671
+ else if (field.FIELDNAME === ".INCLUDE"
50672
+ || field.FIELDNAME.startsWith(".INCLU-")) {
50212
50673
  if (field.PRECFIELD === undefined) {
50213
- return new Types.UnknownType("Table, parser error, PRECFIELD undefined");
50674
+ return new Types.UnknownType("Table, parser error, PRECFIELD undefined, " + this.getName());
50214
50675
  }
50215
50676
  const lookup = ddic.lookupTableOrView(field.PRECFIELD);
50216
50677
  let found = lookup.type;
@@ -50224,8 +50685,11 @@ class Table extends _abstract_object_1.AbstractObject {
50224
50685
  if (field.GROUPNAME !== undefined) {
50225
50686
  components.push({ name: field.GROUPNAME, type: found });
50226
50687
  }
50227
- for (const c of found.getComponents()) {
50228
- components.push({ name: c.name, type: c.type });
50688
+ if (field.FIELDNAME.startsWith(".INCLU-") === false
50689
+ || field.FIELDNAME === ".INCLU--AP") {
50690
+ for (const c of found.getComponents()) {
50691
+ components.push({ name: c.name, type: c.type });
50692
+ }
50229
50693
  }
50230
50694
  }
50231
50695
  else if ((((_a = field.PRECFIELD) === null || _a === void 0 ? void 0 : _a.startsWith("CI_")) || ((_b = field.PRECFIELD) === null || _b === void 0 ? void 0 : _b.startsWith("SI_")))
@@ -50242,26 +50706,25 @@ class Table extends _abstract_object_1.AbstractObject {
50242
50706
  else {
50243
50707
  components.push({ name: field.FIELDNAME, type: found });
50244
50708
  }
50245
- }
50246
- else if (comptype === "S" && field.FIELDNAME.startsWith(".INCLU-")) {
50709
+ /*
50710
+ } else if (comptype === "S" && field.FIELDNAME.startsWith(".INCLU-")) {
50247
50711
  const lookup = ddic.lookupTableOrView(field.PRECFIELD);
50248
50712
  if (lookup.object) {
50249
- references.push({ object: lookup.object });
50713
+ references.push({object: lookup.object});
50250
50714
  }
50251
50715
  const found = lookup.type;
50252
50716
  if (found instanceof Types.VoidType) {
50253
- // set the full structure to void
50254
- return found;
50255
- }
50256
- else if (found instanceof Types.StructureType) {
50257
- const suffix = field.FIELDNAME.split("-")[1];
50258
- for (const c of found.getComponents()) {
50259
- components.push({ name: c.name + suffix, type: c.type });
50260
- }
50261
- }
50262
- else if (found instanceof Types.UnknownType) {
50263
- return found;
50717
+ // set the full structure to void
50718
+ return found;
50719
+ } else if (found instanceof Types.StructureType) {
50720
+ const suffix = field.FIELDNAME.split("-")[1];
50721
+ for (const c of found.getComponents()) {
50722
+ components.push({name: c.name + suffix, type: c.type});
50723
+ }
50724
+ } else if (found instanceof Types.UnknownType) {
50725
+ return found;
50264
50726
  }
50727
+ */
50265
50728
  }
50266
50729
  else if (comptype === "S") {
50267
50730
  const lookup = ddic.lookupTableOrView(field.ROLLNAME);
@@ -50330,7 +50793,13 @@ class Table extends _abstract_object_1.AbstractObject {
50330
50793
  const length = field.LENG ? field.LENG : field.INTLEN;
50331
50794
  components.push({
50332
50795
  name: field.FIELDNAME,
50333
- type: ddic.textToType(datatype, length, field.DECIMALS, this.getName() + "-" + field.FIELDNAME)
50796
+ type: ddic.textToType({
50797
+ text: datatype,
50798
+ length: length,
50799
+ decimals: field.DECIMALS,
50800
+ infoText: this.getName() + "-" + field.FIELDNAME,
50801
+ description: field.DDTEXT,
50802
+ })
50334
50803
  });
50335
50804
  }
50336
50805
  else {
@@ -50350,7 +50819,7 @@ class Table extends _abstract_object_1.AbstractObject {
50350
50819
  return new Types.UnknownType("Table/Structure " + this.getName() + " does not contain any components");
50351
50820
  }
50352
50821
  reg.getDDICReferences().setUsing(this, references);
50353
- return new Types.StructureType(components, this.getName(), this.getName());
50822
+ return new Types.StructureType(components, this.getName(), this.getName(), this.getDescription());
50354
50823
  }
50355
50824
  getTableCategory() {
50356
50825
  var _a;
@@ -50407,6 +50876,7 @@ class Table extends _abstract_object_1.AbstractObject {
50407
50876
  GROUPNAME: field.GROUPNAME,
50408
50877
  CHECKTABLE: field.CHECKTABLE,
50409
50878
  REFTYPE: field.REFTYPE,
50879
+ DDTEXT: field.DDTEXT,
50410
50880
  });
50411
50881
  }
50412
50882
  }
@@ -50528,34 +50998,34 @@ class TableType extends _abstract_object_1.AbstractObject {
50528
50998
  }
50529
50999
  else if (this.parsedXML.rowkind === "S") {
50530
51000
  const lookup = ddic.lookupTableOrView(this.parsedXML.rowtype);
50531
- type = new Types.TableType(lookup.type, tableOptions, this.getName());
51001
+ type = new Types.TableType(lookup.type, tableOptions, this.getName(), this.getDescription());
50532
51002
  if (lookup.object) {
50533
51003
  references.push({ object: lookup.object });
50534
51004
  }
50535
51005
  }
50536
51006
  else if (this.parsedXML.rowkind === "E") {
50537
51007
  const lookup = ddic.lookupDataElement(this.parsedXML.rowtype);
50538
- type = new Types.TableType(lookup.type, tableOptions, this.getName());
51008
+ type = new Types.TableType(lookup.type, tableOptions, this.getName(), this.getDescription());
50539
51009
  if (lookup.object) {
50540
51010
  references.push({ object: lookup.object });
50541
51011
  }
50542
51012
  }
50543
51013
  else if (this.parsedXML.rowkind === "L") {
50544
51014
  const lookup = ddic.lookupTableType(this.parsedXML.rowtype);
50545
- type = new Types.TableType(lookup.type, tableOptions, this.getName());
51015
+ type = new Types.TableType(lookup.type, tableOptions, this.getName(), this.getDescription());
50546
51016
  if (lookup.object) {
50547
51017
  references.push({ object: lookup.object });
50548
51018
  }
50549
51019
  }
50550
51020
  else if (this.parsedXML.rowkind === "R" && this.parsedXML.rowtype === "OBJECT") {
50551
- type = new Types.TableType(new basic_1.GenericObjectReferenceType(), tableOptions, this.getName());
51021
+ type = new Types.TableType(new basic_1.GenericObjectReferenceType(), tableOptions, this.getName(), this.getDescription());
50552
51022
  }
50553
51023
  else if (this.parsedXML.rowkind === "R" && this.parsedXML.rowtype === "DATA") {
50554
- type = new Types.TableType(new basic_1.DataReference(new Types.DataType()), tableOptions, this.getName());
51024
+ type = new Types.TableType(new basic_1.DataReference(new Types.DataType()), tableOptions, this.getName(), this.getDescription());
50555
51025
  }
50556
51026
  else if (this.parsedXML.rowkind === "R" && this.parsedXML.rowtype !== undefined) {
50557
51027
  const lookup = ddic.lookupObject(this.parsedXML.rowtype);
50558
- type = new Types.TableType(lookup.type, tableOptions, this.getName());
51028
+ type = new Types.TableType(lookup.type, tableOptions, this.getName(), this.getDescription());
50559
51029
  if (lookup.object) {
50560
51030
  references.push({ object: lookup.object });
50561
51031
  }
@@ -50565,8 +51035,13 @@ class TableType extends _abstract_object_1.AbstractObject {
50565
51035
  type = new Types.UnknownType("Table Type, empty DATATYPE" + this.getName(), this.getName());
50566
51036
  }
50567
51037
  else {
50568
- const row = ddic.textToType(this.parsedXML.datatype, this.parsedXML.leng, this.parsedXML.decimals, this.getName());
50569
- type = new Types.TableType(row, tableOptions, this.getName());
51038
+ const row = ddic.textToType({
51039
+ text: this.parsedXML.datatype,
51040
+ length: this.parsedXML.leng,
51041
+ decimals: this.parsedXML.decimals,
51042
+ infoText: this.getName(),
51043
+ });
51044
+ type = new Types.TableType(row, tableOptions, this.getName(), this.getDescription());
50570
51045
  }
50571
51046
  }
50572
51047
  else {
@@ -50911,9 +51386,25 @@ class View extends _abstract_object_1.AbstractObject {
50911
51386
  }
50912
51387
  return new Types.StructureType(components, this.getName());
50913
51388
  }
51389
+ listKeys() {
51390
+ var _a;
51391
+ if (this.parsedData === undefined) {
51392
+ this.parseXML();
51393
+ }
51394
+ const ret = [];
51395
+ for (const p of ((_a = this.parsedData) === null || _a === void 0 ? void 0 : _a.fields) || []) {
51396
+ if (p.KEYFLAG === "X") {
51397
+ ret.push(p.FIELDNAME);
51398
+ }
51399
+ }
51400
+ return ret;
51401
+ }
50914
51402
  getDescription() {
50915
- // todo
50916
- return undefined;
51403
+ var _a;
51404
+ if (this.parsedData === undefined) {
51405
+ this.parseXML();
51406
+ }
51407
+ return (_a = this.parsedData) === null || _a === void 0 ? void 0 : _a.header.DDTEXT;
50917
51408
  }
50918
51409
  ///////////////
50919
51410
  parseXML() {
@@ -50921,6 +51412,7 @@ class View extends _abstract_object_1.AbstractObject {
50921
51412
  this.parsedData = {
50922
51413
  header: {
50923
51414
  VIEWCLASS: "",
51415
+ DDTEXT: "",
50924
51416
  },
50925
51417
  fields: [],
50926
51418
  join: [],
@@ -50932,6 +51424,7 @@ class View extends _abstract_object_1.AbstractObject {
50932
51424
  const header = (_a = parsed.abapGit["asx:abap"]["asx:values"]) === null || _a === void 0 ? void 0 : _a.DD25V;
50933
51425
  this.parsedData.header = {
50934
51426
  VIEWCLASS: (header === null || header === void 0 ? void 0 : header.VIEWCLASS) || "",
51427
+ DDTEXT: (header === null || header === void 0 ? void 0 : header.DDTEXT) || "",
50935
51428
  };
50936
51429
  const fields = (_b = parsed.abapGit["asx:abap"]["asx:values"]) === null || _b === void 0 ? void 0 : _b.DD27P_TABLE;
50937
51430
  for (const field of (0, xml_utils_1.xmlToArray)(fields === null || fields === void 0 ? void 0 : fields.DD27P)) {
@@ -50939,6 +51432,7 @@ class View extends _abstract_object_1.AbstractObject {
50939
51432
  VIEWFIELD: field.VIEWFIELD,
50940
51433
  TABNAME: field.TABNAME,
50941
51434
  FIELDNAME: field.FIELDNAME,
51435
+ KEYFLAG: field.KEYFLAG,
50942
51436
  });
50943
51437
  }
50944
51438
  const join = (_c = parsed.abapGit["asx:abap"]["asx:values"]) === null || _c === void 0 ? void 0 : _c.DD28J_TABLE;
@@ -51394,6 +51888,7 @@ class Indent {
51394
51888
  else if (type instanceof Statements.StartOfSelection
51395
51889
  || type instanceof Statements.AtSelectionScreen
51396
51890
  || type instanceof Statements.AtLineSelection
51891
+ || type instanceof Statements.AtPF
51397
51892
  || type instanceof Statements.Initialization
51398
51893
  || type instanceof Statements.AtUserCommand
51399
51894
  || type instanceof Statements.TopOfPage
@@ -51677,7 +52172,7 @@ class Registry {
51677
52172
  }
51678
52173
  static abaplintVersion() {
51679
52174
  // magic, see build script "version.sh"
51680
- return "2.113.16";
52175
+ return "2.113.70";
51681
52176
  }
51682
52177
  getDDICReferences() {
51683
52178
  return this.ddicReferences;
@@ -55384,6 +55879,7 @@ const _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ "./
55384
55879
  const position_1 = __webpack_require__(/*! ../position */ "./node_modules/@abaplint/core/build/src/position.js");
55385
55880
  const edit_helper_1 = __webpack_require__(/*! ../edit_helper */ "./node_modules/@abaplint/core/build/src/edit_helper.js");
55386
55881
  const _irule_1 = __webpack_require__(/*! ./_irule */ "./node_modules/@abaplint/core/build/src/rules/_irule.js");
55882
+ const _statement_1 = __webpack_require__(/*! ../abap/2_statements/statements/_statement */ "./node_modules/@abaplint/core/build/src/abap/2_statements/statements/_statement.js");
55387
55883
  class ColonMissingSpaceConf extends _basic_rule_config_1.BasicRuleConfig {
55388
55884
  }
55389
55885
  exports.ColonMissingSpaceConf = ColonMissingSpaceConf;
@@ -55413,18 +55909,29 @@ class ColonMissingSpace extends _abap_rule_1.ABAPRule {
55413
55909
  }
55414
55910
  runParsed(file) {
55415
55911
  const issues = [];
55416
- const tokens = file.getTokens();
55417
- for (let i = 0; i < tokens.length; i++) {
55418
- const token = tokens[i];
55419
- if (token.getStr() === ":"
55420
- && tokens[i + 1] !== undefined
55421
- && tokens[i + 1].getRow() === token.getRow()
55422
- && tokens[i + 1].getCol() === token.getCol() + 1) {
55423
- const start = token.getStart();
55424
- const end = new position_1.Position(start.getRow(), start.getCol() + 1);
55425
- const fix = edit_helper_1.EditHelper.insertAt(file, end, " ");
55426
- const issue = issue_1.Issue.atRange(file, start, end, this.getMessage(), this.getMetadata().key, this.conf.severity, fix);
55427
- issues.push(issue);
55912
+ for (const statement of file.getStatements()) {
55913
+ const colon = statement.getColon();
55914
+ if (colon === undefined
55915
+ || statement.get() instanceof _statement_1.NativeSQL
55916
+ || statement.get() instanceof _statement_1.Comment) {
55917
+ continue;
55918
+ }
55919
+ // todo: this can be more smart, performance wise
55920
+ const tokens = [...statement.getTokens()];
55921
+ tokens.push(colon);
55922
+ tokens.sort((a, b) => a.getStart().isAfter(b.getStart()) ? 1 : -1);
55923
+ for (let i = 0; i < tokens.length; i++) {
55924
+ const token = tokens[i];
55925
+ if (token.getStr() === ":"
55926
+ && tokens[i + 1] !== undefined
55927
+ && tokens[i + 1].getRow() === token.getRow()
55928
+ && tokens[i + 1].getCol() === token.getCol() + 1) {
55929
+ const start = token.getStart();
55930
+ const end = new position_1.Position(start.getRow(), start.getCol() + 1);
55931
+ const fix = edit_helper_1.EditHelper.insertAt(file, end, " ");
55932
+ const issue = issue_1.Issue.atRange(file, start, end, this.getMessage(), this.getMetadata().key, this.conf.severity, fix);
55933
+ issues.push(issue);
55934
+ }
55428
55935
  }
55429
55936
  }
55430
55937
  return issues;
@@ -56607,6 +57114,9 @@ class DoubleSpace extends _abap_rule_1.ABAPRule {
56607
57114
  runParsed(file) {
56608
57115
  let issues = [];
56609
57116
  for (const s of file.getStatements()) {
57117
+ if (s.get() instanceof _statement_1.NativeSQL) {
57118
+ continue;
57119
+ }
56610
57120
  if (this.conf.keywords === true
56611
57121
  && !(s.get() instanceof _statement_1.Unknown)
56612
57122
  && !(s.get() instanceof statements_1.MethodDef)
@@ -57491,7 +58001,7 @@ ${indentation}`);
57491
58001
  return issue_1.Issue.atToken(lowFile, inlineData.getFirstToken(), "Outline SELECT @DATA", this.getMetadata().key, this.conf.severity, fix);
57492
58002
  }
57493
58003
  downportSelectTableInline(low, high, lowFile, highSyntax) {
57494
- var _a, _b, _c, _d, _e;
58004
+ var _a, _b, _c, _d, _e, _f, _g;
57495
58005
  if (!(low.get() instanceof _statement_1.Unknown)) {
57496
58006
  return undefined;
57497
58007
  }
@@ -57512,13 +58022,22 @@ ${indentation}`);
57512
58022
  if (tableName === undefined) {
57513
58023
  return undefined;
57514
58024
  }
58025
+ const tableMap = {};
58026
+ for (const from of sqlFrom) {
58027
+ const dbName = (_c = from.findDirectExpression(Expressions.DatabaseTable)) === null || _c === void 0 ? void 0 : _c.concatTokens().toUpperCase();
58028
+ if (dbName === undefined) {
58029
+ continue;
58030
+ }
58031
+ const asName = ((_d = from.findDirectExpression(Expressions.SQLAsName)) === null || _d === void 0 ? void 0 : _d.concatTokens().toUpperCase()) || dbName;
58032
+ tableMap[asName] = dbName;
58033
+ }
57515
58034
  const fieldList = high.findFirstExpression(Expressions.SQLFieldList);
57516
58035
  if (fieldList === undefined) {
57517
58036
  return undefined;
57518
58037
  }
57519
58038
  let fieldDefinitions = "";
57520
58039
  for (const f of fieldList.findAllExpressions(Expressions.SQLField)) {
57521
- let fieldName = (_c = f.findFirstExpression(Expressions.SQLFieldName)) === null || _c === void 0 ? void 0 : _c.concatTokens();
58040
+ let fieldName = (_e = f.findFirstExpression(Expressions.SQLFieldName)) === null || _e === void 0 ? void 0 : _e.concatTokens();
57522
58041
  if (fieldName === undefined) {
57523
58042
  continue;
57524
58043
  }
@@ -57527,12 +58046,13 @@ ${indentation}`);
57527
58046
  tableName = split[0];
57528
58047
  fieldName = split[1];
57529
58048
  }
57530
- const typeName = tableName + "-" + fieldName;
57531
- fieldName = ((_d = f.findFirstExpression(Expressions.SQLAsName)) === null || _d === void 0 ? void 0 : _d.concatTokens()) || fieldName;
57532
- fieldDefinitions += indentation + " " + fieldName + " TYPE " + typeName + ",\n";
58049
+ const translated = tableMap[tableName.toUpperCase()];
58050
+ const typeName = translated + "-" + fieldName;
58051
+ fieldName = ((_f = f.findFirstExpression(Expressions.SQLAsName)) === null || _f === void 0 ? void 0 : _f.concatTokens()) || fieldName;
58052
+ fieldDefinitions += indentation + " " + fieldName + " TYPE " + typeName.toLowerCase() + ",\n";
57533
58053
  }
57534
58054
  const uniqueName = this.uniqueName(high.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);
57535
- const name = ((_e = inlineData.findFirstExpression(Expressions.TargetField)) === null || _e === void 0 ? void 0 : _e.concatTokens()) || "error";
58055
+ const name = ((_g = inlineData.findFirstExpression(Expressions.TargetField)) === null || _g === void 0 ? void 0 : _g.concatTokens()) || "error";
57536
58056
  let fix1 = edit_helper_1.EditHelper.insertAt(lowFile, high.getStart(), `TYPES: BEGIN OF ${uniqueName},
57537
58057
  ${fieldDefinitions}${indentation} END OF ${uniqueName}.
57538
58058
  ${indentation}DATA ${name} TYPE STANDARD TABLE OF ${uniqueName} WITH DEFAULT KEY.
@@ -57923,7 +58443,7 @@ ${indentation}CATCH ${className} INTO ${targetName}.`;
57923
58443
  }
57924
58444
  startToken = node.getFirstToken();
57925
58445
  }
57926
- const withs = ((_f = node.findDirectExpression(Expressions.RaiseWith)) === null || _f === void 0 ? void 0 : _f.findDirectExpressions(Expressions.SimpleSource1)) || [];
58446
+ const withs = ((_f = node.findDirectExpression(Expressions.RaiseWith)) === null || _f === void 0 ? void 0 : _f.findDirectExpressionsMulti([Expressions.SimpleSource1, Expressions.Source])) || [];
57927
58447
  const className = ((_g = node.findDirectExpression(Expressions.ClassName)) === null || _g === void 0 ? void 0 : _g.concatTokens()) || "ERROR";
57928
58448
  const uniqueName1 = this.uniqueName(node.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);
57929
58449
  const uniqueName2 = this.uniqueName(node.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);
@@ -58454,21 +58974,17 @@ ${indentation}${uniqueName}`;
58454
58974
  const fix = edit_helper_1.EditHelper.replaceRange(lowFile, op.getStart(), sourceStart, "= " + target + operator);
58455
58975
  return issue_1.Issue.atToken(lowFile, high.getFirstToken(), "Expand operator", this.getMetadata().key, this.conf.severity, fix);
58456
58976
  }
58457
- // must be very simple string templates, like "|{ ls_line-no ALPHA = IN }|"
58458
58977
  stringTemplateAlpha(low, high, lowFile, highSyntax) {
58459
58978
  var _a, _b;
58460
58979
  if (!(low.get() instanceof _statement_1.Unknown)) {
58461
58980
  return undefined;
58462
58981
  }
58463
- for (const child of high.findAllExpressionsRecursive(Expressions.StringTemplate)) {
58464
- const templateTokens = child.getChildren();
58465
- if (templateTokens.length !== 3
58466
- || templateTokens[0].getFirstToken().getStr() !== "|{"
58467
- || templateTokens[2].getFirstToken().getStr() !== "}|") {
58982
+ for (const child of high.findAllExpressionsRecursive(Expressions.StringTemplateSource)) {
58983
+ const formatting = (_a = child.findDirectExpression(Expressions.StringTemplateFormatting)) === null || _a === void 0 ? void 0 : _a.concatTokens().toUpperCase();
58984
+ if (formatting === undefined
58985
+ || (formatting === null || formatting === void 0 ? void 0 : formatting.startsWith("ALPHA = ")) === false) {
58468
58986
  continue;
58469
58987
  }
58470
- const templateSource = child.findDirectExpression(Expressions.StringTemplateSource);
58471
- const formatting = (_a = templateSource === null || templateSource === void 0 ? void 0 : templateSource.findDirectExpression(Expressions.StringTemplateFormatting)) === null || _a === void 0 ? void 0 : _a.concatTokens();
58472
58988
  let functionName = "";
58473
58989
  switch (formatting) {
58474
58990
  case "ALPHA = IN":
@@ -58481,7 +58997,7 @@ ${indentation}${uniqueName}`;
58481
58997
  return undefined;
58482
58998
  }
58483
58999
  const indentation = " ".repeat(high.getFirstToken().getStart().getCol() - 1);
58484
- const source = (_b = templateSource === null || templateSource === void 0 ? void 0 : templateSource.findDirectExpression(Expressions.Source)) === null || _b === void 0 ? void 0 : _b.concatTokens();
59000
+ const source = (_b = child.findDirectExpression(Expressions.Source)) === null || _b === void 0 ? void 0 : _b.concatTokens();
58485
59001
  const uniqueName = this.uniqueName(high.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);
58486
59002
  const code = `DATA ${uniqueName} TYPE string.
58487
59003
  ${indentation}CALL FUNCTION '${functionName}'
@@ -61070,6 +61586,8 @@ class FullyTypeITabs extends _abap_rule_1.ABAPRule {
61070
61586
  key: "fully_type_itabs",
61071
61587
  title: "Fully type internal tables",
61072
61588
  shortDescription: `No implict table types or table keys`,
61589
+ extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#use-the-right-table-type
61590
+ https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#avoid-default-key`,
61073
61591
  badExample: `DATA lt_foo TYPE TABLE OF ty.
61074
61592
  DATA lt_bar TYPE STANDARD TABLE OF ty.`,
61075
61593
  goodExample: `DATA lt_foo TYPE STANDARD TABLE OF ty WITH EMPTY KEY.`,
@@ -62565,6 +63083,7 @@ const ddic_1 = __webpack_require__(/*! ../ddic */ "./node_modules/@abaplint/core
62565
63083
  const position_1 = __webpack_require__(/*! ../position */ "./node_modules/@abaplint/core/build/src/position.js");
62566
63084
  const virtual_position_1 = __webpack_require__(/*! ../virtual_position */ "./node_modules/@abaplint/core/build/src/virtual_position.js");
62567
63085
  const edit_helper_1 = __webpack_require__(/*! ../edit_helper */ "./node_modules/@abaplint/core/build/src/edit_helper.js");
63086
+ const _statement_1 = __webpack_require__(/*! ../abap/2_statements/statements/_statement */ "./node_modules/@abaplint/core/build/src/abap/2_statements/statements/_statement.js");
62568
63087
  class IndentationConf extends _basic_rule_config_1.BasicRuleConfig {
62569
63088
  constructor() {
62570
63089
  super(...arguments);
@@ -62676,6 +63195,9 @@ ENDCLASS.`,
62676
63195
  continue;
62677
63196
  }
62678
63197
  }
63198
+ if (statement.get() instanceof _statement_1.NativeSQL) {
63199
+ continue;
63200
+ }
62679
63201
  // only apply for the first statement in a chain
62680
63202
  if (statement.getColon() !== undefined
62681
63203
  && (previous === null || previous === void 0 ? void 0 : previous.getColon()) !== undefined
@@ -63370,6 +63892,7 @@ class Skip {
63370
63892
  skipStatement(statement) {
63371
63893
  const get = statement.get();
63372
63894
  if (get instanceof _statement_1.Unknown
63895
+ || get instanceof _statement_1.NativeSQL
63373
63896
  || get instanceof _statement_1.MacroContent
63374
63897
  || get instanceof _statement_1.MacroCall
63375
63898
  || statement.getFirstToken().getStart() instanceof virtual_position_1.VirtualPosition
@@ -67936,12 +68459,23 @@ This rule makes sure the spaces are consistently required across the language.`,
67936
68459
  if (children.length < 2) {
67937
68460
  return undefined;
67938
68461
  }
67939
- const nextLast = children[children.length - 2];
67940
- const last = children[children.length - 1];
67941
- if (nextLast.getStr().startsWith("'")
67942
- && nextLast.getRow() === last.getRow()
67943
- && nextLast.getEnd().getCol() === last.getStart().getCol()) {
67944
- return last.getEnd();
68462
+ if (children.length >= 4
68463
+ && children[0].getStr().toUpperCase() === "CONV") {
68464
+ const first = children[2];
68465
+ const second = children[3];
68466
+ if (first.getRow() === second.getRow()
68467
+ && first.getCol() + 1 === second.getStart().getCol()) {
68468
+ return second.getStart();
68469
+ }
68470
+ }
68471
+ {
68472
+ const nextLast = children[children.length - 2];
68473
+ const last = children[children.length - 1];
68474
+ if (nextLast.getStr().startsWith("'")
68475
+ && nextLast.getRow() === last.getRow()
68476
+ && nextLast.getEnd().getCol() === last.getStart().getCol()) {
68477
+ return last.getEnd();
68478
+ }
67945
68479
  }
67946
68480
  return undefined;
67947
68481
  }
@@ -70015,7 +70549,11 @@ class SelectionScreenNaming extends _abap_rule_1.ABAPRule {
70015
70549
  return statNode.findFirstExpression(expressions_1.FieldSub);
70016
70550
  }
70017
70551
  else if (statNode.get() instanceof statements_1.SelectionScreen) {
70018
- return statNode.findFirstExpression(expressions_1.InlineField);
70552
+ let ret = statNode.findFirstExpression(expressions_1.InlineField);
70553
+ if (ret === undefined && statNode.concatTokens().toUpperCase().includes(" BEGIN OF TABBED BLOCK")) {
70554
+ ret = statNode.findFirstExpression(expressions_1.BlockName);
70555
+ }
70556
+ return ret;
70019
70557
  }
70020
70558
  else {
70021
70559
  return undefined;
@@ -70520,6 +71058,8 @@ const issue_1 = __webpack_require__(/*! ../issue */ "./node_modules/@abaplint/co
70520
71058
  const _abap_rule_1 = __webpack_require__(/*! ./_abap_rule */ "./node_modules/@abaplint/core/build/src/rules/_abap_rule.js");
70521
71059
  const _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ "./node_modules/@abaplint/core/build/src/rules/_basic_rule_config.js");
70522
71060
  const _irule_1 = __webpack_require__(/*! ./_irule */ "./node_modules/@abaplint/core/build/src/rules/_irule.js");
71061
+ const _statement_1 = __webpack_require__(/*! ../abap/2_statements/statements/_statement */ "./node_modules/@abaplint/core/build/src/abap/2_statements/statements/_statement.js");
71062
+ const tokens_1 = __webpack_require__(/*! ../abap/1_lexer/tokens */ "./node_modules/@abaplint/core/build/src/abap/1_lexer/tokens/index.js");
70523
71063
  class SpaceBeforeColonConf extends _basic_rule_config_1.BasicRuleConfig {
70524
71064
  }
70525
71065
  exports.SpaceBeforeColonConf = SpaceBeforeColonConf;
@@ -70550,22 +71090,34 @@ class SpaceBeforeColon extends _abap_rule_1.ABAPRule {
70550
71090
  }
70551
71091
  runParsed(file) {
70552
71092
  const issues = [];
70553
- let prev = file.getTokens()[0];
70554
- for (const token of file.getTokens()) {
70555
- if (token.getStr() === ":" && !prev) {
70556
- const issue = issue_1.Issue.atToken(file, token, this.getMessage(), this.getMetadata().key, this.conf.severity);
70557
- issues.push(issue);
71093
+ for (const statement of file.getStatements()) {
71094
+ const colon = statement.getColon();
71095
+ if (colon === undefined
71096
+ || statement.get() instanceof _statement_1.NativeSQL
71097
+ || statement.get() instanceof tokens_1.Comment) {
71098
+ continue;
70558
71099
  }
70559
- else if (token.getStr() === ":"
70560
- && prev.getRow() === token.getRow()
70561
- && prev.getCol() + prev.getStr().length < token.getCol()) {
70562
- const start = new position_1.Position(token.getRow(), prev.getEnd().getCol());
70563
- const end = new position_1.Position(token.getRow(), token.getStart().getCol());
70564
- const fix = edit_helper_1.EditHelper.deleteRange(file, start, end);
70565
- const issue = issue_1.Issue.atRowRange(file, start.getRow(), start.getCol(), end.getCol(), this.getMessage(), this.getMetadata().key, this.conf.severity, fix);
70566
- issues.push(issue);
71100
+ // todo: this can be more smart, performance wise
71101
+ const tokens = [...statement.getTokens()];
71102
+ tokens.push(colon);
71103
+ tokens.sort((a, b) => a.getStart().isAfter(b.getStart()) ? 1 : -1);
71104
+ let prev = tokens[0];
71105
+ for (const token of tokens) {
71106
+ if (token.getStr() === ":" && !prev) {
71107
+ const issue = issue_1.Issue.atToken(file, token, this.getMessage(), this.getMetadata().key, this.conf.severity);
71108
+ issues.push(issue);
71109
+ }
71110
+ else if (token.getStr() === ":"
71111
+ && prev.getRow() === token.getRow()
71112
+ && prev.getCol() + prev.getStr().length < token.getCol()) {
71113
+ const start = new position_1.Position(token.getRow(), prev.getEnd().getCol());
71114
+ const end = new position_1.Position(token.getRow(), token.getStart().getCol());
71115
+ const fix = edit_helper_1.EditHelper.deleteRange(file, start, end);
71116
+ const issue = issue_1.Issue.atRowRange(file, start.getRow(), start.getCol(), end.getCol(), this.getMessage(), this.getMetadata().key, this.conf.severity, fix);
71117
+ issues.push(issue);
71118
+ }
71119
+ prev = token;
70567
71120
  }
70568
- prev = token;
70569
71121
  }
70570
71122
  return issues;
70571
71123
  }
@@ -75322,7 +75874,6 @@ exports.Chunk = Chunk;
75322
75874
 
75323
75875
  Object.defineProperty(exports, "__esModule", ({ value: true }));
75324
75876
  exports.DatabaseSetup = void 0;
75325
- /* eslint-disable max-len */
75326
75877
  const abaplint = __webpack_require__(/*! @abaplint/core */ "./node_modules/@abaplint/core/build/src/index.js");
75327
75878
  const sqlite_database_schema_1 = __webpack_require__(/*! ./schema_generation/sqlite_database_schema */ "./node_modules/@abaplint/transpiler/build/src/db/schema_generation/sqlite_database_schema.js");
75328
75879
  const pg_database_schema_1 = __webpack_require__(/*! ./schema_generation/pg_database_schema */ "./node_modules/@abaplint/transpiler/build/src/db/schema_generation/pg_database_schema.js");
@@ -75971,7 +76522,7 @@ class CompareTranspiler {
75971
76522
  // todo, this is not correct
75972
76523
  const concat = node.concatTokens().toUpperCase();
75973
76524
  let pre = concat.startsWith("NOT ") ? "!" : "";
75974
- const sources = node.findDirectExpressions(core_1.Expressions.Source).concat(node.findDirectExpressions(core_1.Expressions.SourceFieldSymbol));
76525
+ const sources = node.findDirectExpressionsMulti([core_1.Expressions.Source, core_1.Expressions.SourceFieldSymbolChain, core_1.Expressions.SourceFieldSymbol]);
75975
76526
  if (sources.length === 1) {
75976
76527
  const s0 = traversal.traverse(sources[0]);
75977
76528
  if (concat.startsWith("NOT ") && concat.endsWith(" IS NOT INITIAL")) {
@@ -76943,6 +77494,7 @@ __exportStar(__webpack_require__(/*! ./field_length */ "./node_modules/@abaplint
76943
77494
  __exportStar(__webpack_require__(/*! ./field_offset */ "./node_modules/@abaplint/transpiler/build/src/expressions/field_offset.js"), exports);
76944
77495
  __exportStar(__webpack_require__(/*! ./field_symbol */ "./node_modules/@abaplint/transpiler/build/src/expressions/field_symbol.js"), exports);
76945
77496
  __exportStar(__webpack_require__(/*! ./function_exporting */ "./node_modules/@abaplint/transpiler/build/src/expressions/function_exporting.js"), exports);
77497
+ __exportStar(__webpack_require__(/*! ./source_field_symbol_chain */ "./node_modules/@abaplint/transpiler/build/src/expressions/source_field_symbol_chain.js"), exports);
76946
77498
  __exportStar(__webpack_require__(/*! ./function_parameters */ "./node_modules/@abaplint/transpiler/build/src/expressions/function_parameters.js"), exports);
76947
77499
  __exportStar(__webpack_require__(/*! ./message_number */ "./node_modules/@abaplint/transpiler/build/src/expressions/message_number.js"), exports);
76948
77500
  __exportStar(__webpack_require__(/*! ./method_call_body */ "./node_modules/@abaplint/transpiler/build/src/expressions/method_call_body.js"), exports);
@@ -77806,6 +78358,27 @@ exports.SourceFieldSymbolTranspiler = SourceFieldSymbolTranspiler;
77806
78358
 
77807
78359
  /***/ }),
77808
78360
 
78361
+ /***/ "./node_modules/@abaplint/transpiler/build/src/expressions/source_field_symbol_chain.js":
78362
+ /*!**********************************************************************************************!*\
78363
+ !*** ./node_modules/@abaplint/transpiler/build/src/expressions/source_field_symbol_chain.js ***!
78364
+ \**********************************************************************************************/
78365
+ /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
78366
+
78367
+ "use strict";
78368
+
78369
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
78370
+ exports.SourceFieldSymbolChainTranspiler = void 0;
78371
+ const _1 = __webpack_require__(/*! . */ "./node_modules/@abaplint/transpiler/build/src/expressions/index.js");
78372
+ class SourceFieldSymbolChainTranspiler {
78373
+ transpile(node, traversal) {
78374
+ return new _1.FieldSymbolTranspiler().transpile(node, traversal);
78375
+ }
78376
+ }
78377
+ exports.SourceFieldSymbolChainTranspiler = SourceFieldSymbolChainTranspiler;
78378
+ //# sourceMappingURL=source_field_symbol_chain.js.map
78379
+
78380
+ /***/ }),
78381
+
77809
78382
  /***/ "./node_modules/@abaplint/transpiler/build/src/expressions/sql_arithmetic_operator.js":
77810
78383
  /*!********************************************************************************************!*\
77811
78384
  !*** ./node_modules/@abaplint/transpiler/build/src/expressions/sql_arithmetic_operator.js ***!
@@ -78828,11 +79401,11 @@ class HandleDataElement {
78828
79401
  fixedValues = doma.getFixedValues();
78829
79402
  }
78830
79403
  }
78831
- const chunk = new chunk_1.Chunk().appendString(`abap.DDIC["${obj.getName().toUpperCase()}"] = {
78832
- "objectType": "DTEL",
78833
- "type": ${new transpile_types_1.TranspileTypes().toType(type)},
78834
- "domain": ${JSON.stringify(obj.getDomainName())},
78835
- "fixedValues": ${JSON.stringify(fixedValues)},
79404
+ const chunk = new chunk_1.Chunk().appendString(`abap.DDIC["${obj.getName().toUpperCase()}"] = {
79405
+ "objectType": "DTEL",
79406
+ "type": ${new transpile_types_1.TranspileTypes().toType(type)},
79407
+ "domain": ${JSON.stringify(obj.getDomainName())},
79408
+ "fixedValues": ${JSON.stringify(fixedValues)},
78836
79409
  };`);
78837
79410
  const output = {
78838
79411
  object: {
@@ -78870,20 +79443,20 @@ class HandleEnqu {
78870
79443
  if (filename === undefined) {
78871
79444
  return [];
78872
79445
  }
78873
- const chunk = new chunk_1.Chunk().appendString(`// enqueue object
78874
- abap.FunctionModules["ENQUEUE_${obj.getName().toUpperCase()}"] = async (INPUT) => {
78875
- const lookup = abap.Classes["KERNEL_LOCK"];
78876
- if (lookup === undefined) {
78877
- throw new Error("Lock, kernel class missing");
78878
- }
78879
- await lookup.enqueue(INPUT);
78880
- };
78881
- abap.FunctionModules["DEQUEUE_${obj.getName().toUpperCase()}"] = async (INPUT) => {
78882
- const lookup = abap.Classes["KERNEL_LOCK"];
78883
- if (lookup === undefined) {
78884
- throw new Error("Lock, kernel class missing");
78885
- }
78886
- await lookup.dequeue(INPUT);
79446
+ const chunk = new chunk_1.Chunk().appendString(`// enqueue object
79447
+ abap.FunctionModules["ENQUEUE_${obj.getName().toUpperCase()}"] = async (INPUT) => {
79448
+ const lookup = abap.Classes["KERNEL_LOCK"];
79449
+ if (lookup === undefined) {
79450
+ throw new Error("Lock, kernel class missing");
79451
+ }
79452
+ await lookup.enqueue(INPUT);
79453
+ };
79454
+ abap.FunctionModules["DEQUEUE_${obj.getName().toUpperCase()}"] = async (INPUT) => {
79455
+ const lookup = abap.Classes["KERNEL_LOCK"];
79456
+ if (lookup === undefined) {
79457
+ throw new Error("Lock, kernel class missing");
79458
+ }
79459
+ await lookup.dequeue(INPUT);
78887
79460
  };`);
78888
79461
  const output = {
78889
79462
  object: {
@@ -79051,11 +79624,11 @@ class HandleSMIM {
79051
79624
  }
79052
79625
  obj.parse();
79053
79626
  const dataFile = obj.getDataFile();
79054
- const chunk = new chunk_1.Chunk().appendString(`abap.SMIM["${obj.getName().toUpperCase()}"] = {
79055
- "objectType": "SMIM",
79056
- "filename": ${JSON.stringify(dataFile?.getFilename())},
79057
- "url": ${JSON.stringify(obj.getURL())},
79058
- "class": ${JSON.stringify(obj.getClass())},
79627
+ const chunk = new chunk_1.Chunk().appendString(`abap.SMIM["${obj.getName().toUpperCase()}"] = {
79628
+ "objectType": "SMIM",
79629
+ "filename": ${JSON.stringify(dataFile?.getFilename())},
79630
+ "url": ${JSON.stringify(obj.getURL())},
79631
+ "class": ${JSON.stringify(obj.getClass())},
79059
79632
  };`);
79060
79633
  const output = {
79061
79634
  object: {
@@ -79109,10 +79682,10 @@ class HandleTable {
79109
79682
  return [];
79110
79683
  }
79111
79684
  const type = obj.parseType(reg);
79112
- const chunk = new chunk_1.Chunk().appendString(`abap.DDIC["${obj.getName().toUpperCase()}"] = {
79113
- "objectType": "TABL",
79114
- "type": ${new transpile_types_1.TranspileTypes().toType(type)},
79115
- "keyFields": ${JSON.stringify(obj.listKeys(reg))},
79685
+ const chunk = new chunk_1.Chunk().appendString(`abap.DDIC["${obj.getName().toUpperCase()}"] = {
79686
+ "objectType": "TABL",
79687
+ "type": ${new transpile_types_1.TranspileTypes().toType(type)},
79688
+ "keyFields": ${JSON.stringify(obj.listKeys(reg))},
79116
79689
  };`);
79117
79690
  const output = {
79118
79691
  object: {
@@ -79151,9 +79724,9 @@ class HandleTableType {
79151
79724
  return [];
79152
79725
  }
79153
79726
  const type = obj.parseType(reg);
79154
- const chunk = new chunk_1.Chunk().appendString(`abap.DDIC["${obj.getName().toUpperCase()}"] = {
79155
- "objectType": "TTYP",
79156
- "type": ${new transpile_types_1.TranspileTypes().toType(type)},
79727
+ const chunk = new chunk_1.Chunk().appendString(`abap.DDIC["${obj.getName().toUpperCase()}"] = {
79728
+ "objectType": "TTYP",
79729
+ "type": ${new transpile_types_1.TranspileTypes().toType(type)},
79157
79730
  };`);
79158
79731
  const output = {
79159
79732
  object: {
@@ -79241,9 +79814,9 @@ class HandleView {
79241
79814
  return [];
79242
79815
  }
79243
79816
  const type = obj.parseType(reg);
79244
- const chunk = new chunk_1.Chunk().appendString(`abap.DDIC["${obj.getName().toUpperCase()}"] = {
79245
- "objectType": "VIEW",
79246
- "type": ${new transpile_types_1.TranspileTypes().toType(type)},
79817
+ const chunk = new chunk_1.Chunk().appendString(`abap.DDIC["${obj.getName().toUpperCase()}"] = {
79818
+ "objectType": "VIEW",
79819
+ "type": ${new transpile_types_1.TranspileTypes().toType(type)},
79247
79820
  };`);
79248
79821
  // todo, "keyFields": ${JSON.stringify(obj.listKeys())},
79249
79822
  const output = {
@@ -79283,9 +79856,9 @@ class HandleW3MI {
79283
79856
  }
79284
79857
  obj.parse();
79285
79858
  const dataFile = obj.getDataFile();
79286
- const chunk = new chunk_1.Chunk().appendString(`abap.W3MI["${obj.getName().toUpperCase()}"] = {
79287
- "objectType": "W3MI",
79288
- "filename": ${JSON.stringify(dataFile?.getFilename())},
79859
+ const chunk = new chunk_1.Chunk().appendString(`abap.W3MI["${obj.getName().toUpperCase()}"] = {
79860
+ "objectType": "W3MI",
79861
+ "filename": ${JSON.stringify(dataFile?.getFilename())},
79289
79862
  };`);
79290
79863
  const output = {
79291
79864
  object: {
@@ -79917,26 +80490,26 @@ class AssignTranspiler {
79917
80490
  const firstFirst = first.getChildren()[1];
79918
80491
  if (firstFirst?.get() instanceof abaplint.Expressions.Constant) {
79919
80492
  const s = firstFirst.getFirstToken().getStr().toLowerCase().match(/\w+/)?.toString();
79920
- options.push(`dynamicSource: (() => {
79921
- try { return ${s}; } catch {}
79922
- try { return this.${s}; } catch {}
80493
+ options.push(`dynamicSource: (() => {
80494
+ try { return ${s}; } catch {}
80495
+ try { return this.${s}; } catch {}
79923
80496
  })()`);
79924
80497
  }
79925
80498
  else if (firstFirst?.get() instanceof abaplint.Expressions.FieldChain && firstFirst instanceof abaplint.Nodes.ExpressionNode) {
79926
80499
  const code = new expressions_1.FieldChainTranspiler(true).transpile(firstFirst, traversal).getCode();
79927
- options.push(`dynamicSource: (() => {
79928
- const name = ${code}.toLowerCase().replace(/[~\\/]/g, "$").match(/[\\w\\$\\/]+/)[0];
79929
- try { return eval(name); } catch {}
79930
- try { return eval("this." + name); } catch {}
80500
+ options.push(`dynamicSource: (() => {
80501
+ const name = ${code}.toLowerCase().replace(/[~\\/]/g, "$").match(/[\\w\\$\\/]+/)[0];
80502
+ try { return eval(name); } catch {}
80503
+ try { return eval("this." + name); } catch {}
79931
80504
  })()`);
79932
80505
  }
79933
80506
  }
79934
80507
  else if (first?.get() instanceof abaplint.Expressions.Source && first instanceof abaplint.Nodes.ExpressionNode) {
79935
80508
  // const name = first.concatTokens().toLowerCase();
79936
80509
  const name = new expressions_1.SourceTranspiler().transpile(first, traversal).getCode();
79937
- options.push(`dynamicSource: (() => {
79938
- try { return ${name}; } catch {}
79939
- try { return this.${name}; } catch {}
80510
+ options.push(`dynamicSource: (() => {
80511
+ try { return ${name}; } catch {}
80512
+ try { return this.${name}; } catch {}
79940
80513
  })()`);
79941
80514
  }
79942
80515
  }
@@ -80144,9 +80717,9 @@ class CallTranspiler {
80144
80717
  let pre = "";
80145
80718
  let post = "";
80146
80719
  pre = "try {\n" + pre;
80147
- post += `\nabap.builtin.sy.get().subrc.set(0);
80148
- } catch (e) {
80149
- if (e.classic) {
80720
+ post += `\nabap.builtin.sy.get().subrc.set(0);
80721
+ } catch (e) {
80722
+ if (e.classic) {
80150
80723
  switch (e.classic.toUpperCase()) {\n`;
80151
80724
  for (const e of node.findAllExpressions(abaplint.Expressions.ParameterException)) {
80152
80725
  const name = e.getFirstToken().getStr().toUpperCase();
@@ -80162,10 +80735,10 @@ if (e.classic) {
80162
80735
  post += `case "${name}": abap.builtin.sy.get().subrc.set(${value}); break;\n`;
80163
80736
  }
80164
80737
  }
80165
- post += ` }
80166
- } else {
80167
- throw e;
80168
- }
80738
+ post += ` }
80739
+ } else {
80740
+ throw e;
80741
+ }
80169
80742
  }`;
80170
80743
  return { pre, post };
80171
80744
  }
@@ -80500,11 +81073,11 @@ class ClassImplementationTranspiler {
80500
81073
  ret += " extends " + traversal_1.Traversal.escapeNamespace(def?.getSuperClass()?.toLowerCase());
80501
81074
  }
80502
81075
  const scope = traversal.findCurrentScopeByToken(token);
80503
- return new chunk_1.Chunk().append(ret + ` {
80504
- static INTERNAL_TYPE = 'CLAS';
80505
- static INTERNAL_NAME = '${traversal.buildInternalName(token.getStr(), def)}';
80506
- static IMPLEMENTED_INTERFACES = [${this.findImplementedByClass(traversal, def, scope).map(e => `"` + e.toUpperCase() + `"`).join(",")}];
80507
- static ATTRIBUTES = {${traversal.buildAttributes(def, scope).join(",\n")}};
81076
+ return new chunk_1.Chunk().append(ret + ` {
81077
+ static INTERNAL_TYPE = 'CLAS';
81078
+ static INTERNAL_NAME = '${traversal.buildInternalName(token.getStr(), def)}';
81079
+ static IMPLEMENTED_INTERFACES = [${this.findImplementedByClass(traversal, def, scope).map(e => `"` + e.toUpperCase() + `"`).join(",")}];
81080
+ static ATTRIBUTES = {${traversal.buildAttributes(def, scope).join(",\n")}};
80508
81081
  static METHODS = {${traversal.buildMethods(def, scope).join(",\n")}};`, node, traversal);
80509
81082
  }
80510
81083
  findImplementedInterface(traversal, def, scope) {
@@ -81260,6 +81833,27 @@ exports.DeleteInternalTranspiler = DeleteInternalTranspiler;
81260
81833
 
81261
81834
  /***/ }),
81262
81835
 
81836
+ /***/ "./node_modules/@abaplint/transpiler/build/src/statements/delete_memory.js":
81837
+ /*!*********************************************************************************!*\
81838
+ !*** ./node_modules/@abaplint/transpiler/build/src/statements/delete_memory.js ***!
81839
+ \*********************************************************************************/
81840
+ /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
81841
+
81842
+ "use strict";
81843
+
81844
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
81845
+ exports.DeleteMemoryTranspiler = void 0;
81846
+ const chunk_1 = __webpack_require__(/*! ../chunk */ "./node_modules/@abaplint/transpiler/build/src/chunk.js");
81847
+ class DeleteMemoryTranspiler {
81848
+ transpile(_node, _traversal) {
81849
+ return new chunk_1.Chunk(`throw new Error("DeleteMemory, not supported, transpiler");`);
81850
+ }
81851
+ }
81852
+ exports.DeleteMemoryTranspiler = DeleteMemoryTranspiler;
81853
+ //# sourceMappingURL=delete_memory.js.map
81854
+
81855
+ /***/ }),
81856
+
81263
81857
  /***/ "./node_modules/@abaplint/transpiler/build/src/statements/delete_report.js":
81264
81858
  /*!*********************************************************************************!*\
81265
81859
  !*** ./node_modules/@abaplint/transpiler/build/src/statements/delete_report.js ***!
@@ -81382,16 +81976,16 @@ class DoTranspiler {
81382
81976
  const source = new expressions_1.SourceTranspiler(true).transpile(found, traversal).getCode();
81383
81977
  const idSource = unique_identifier_1.UniqueIdentifier.get();
81384
81978
  const id = unique_identifier_1.UniqueIdentifier.get();
81385
- return new chunk_1.Chunk(`const ${this.syIndexBackup} = abap.builtin.sy.get().index.get();
81386
- const ${idSource} = ${source};
81387
- for (let ${id} = 0; ${id} < ${idSource}; ${id}++) {
81979
+ return new chunk_1.Chunk(`const ${this.syIndexBackup} = abap.builtin.sy.get().index.get();
81980
+ const ${idSource} = ${source};
81981
+ for (let ${id} = 0; ${id} < ${idSource}; ${id}++) {
81388
81982
  abap.builtin.sy.get().index.set(${id} + 1);`);
81389
81983
  }
81390
81984
  else {
81391
81985
  const unique = unique_identifier_1.UniqueIdentifier.get();
81392
- return new chunk_1.Chunk(`const ${this.syIndexBackup} = abap.builtin.sy.get().index.get();
81393
- let ${unique} = 1;
81394
- while (true) {
81986
+ return new chunk_1.Chunk(`const ${this.syIndexBackup} = abap.builtin.sy.get().index.get();
81987
+ let ${unique} = 1;
81988
+ while (true) {
81395
81989
  abap.builtin.sy.get().index.set(${unique}++);`);
81396
81990
  }
81397
81991
  }
@@ -81551,7 +82145,7 @@ class EndDoTranspiler {
81551
82145
  this.syIndexBackup = syIndexBackup;
81552
82146
  }
81553
82147
  transpile(node, traversal) {
81554
- return new chunk_1.Chunk().append(`}
82148
+ return new chunk_1.Chunk().append(`}
81555
82149
  abap.builtin.sy.get().index.set(${this.syIndexBackup});\n`, node, traversal);
81556
82150
  }
81557
82151
  }
@@ -81750,7 +82344,7 @@ class EndWhileTranspiler {
81750
82344
  this.syIndexBackup = syIndexBackup;
81751
82345
  }
81752
82346
  transpile(node, traversal) {
81753
- return new chunk_1.Chunk().append(`}
82347
+ return new chunk_1.Chunk().append(`}
81754
82348
  abap.builtin.sy.get().index.set(${this.syIndexBackup});\n`, node, traversal);
81755
82349
  }
81756
82350
  }
@@ -82485,6 +83079,7 @@ __exportStar(__webpack_require__(/*! ./delete_database */ "./node_modules/@abapl
82485
83079
  __exportStar(__webpack_require__(/*! ./delete_dataset */ "./node_modules/@abaplint/transpiler/build/src/statements/delete_dataset.js"), exports);
82486
83080
  __exportStar(__webpack_require__(/*! ./delete_internal */ "./node_modules/@abaplint/transpiler/build/src/statements/delete_internal.js"), exports);
82487
83081
  __exportStar(__webpack_require__(/*! ./delete_report */ "./node_modules/@abaplint/transpiler/build/src/statements/delete_report.js"), exports);
83082
+ __exportStar(__webpack_require__(/*! ./delete_memory */ "./node_modules/@abaplint/transpiler/build/src/statements/delete_memory.js"), exports);
82488
83083
  __exportStar(__webpack_require__(/*! ./delete_textpool */ "./node_modules/@abaplint/transpiler/build/src/statements/delete_textpool.js"), exports);
82489
83084
  __exportStar(__webpack_require__(/*! ./describe */ "./node_modules/@abaplint/transpiler/build/src/statements/describe.js"), exports);
82490
83085
  __exportStar(__webpack_require__(/*! ./do */ "./node_modules/@abaplint/transpiler/build/src/statements/do.js"), exports);
@@ -83154,9 +83749,9 @@ class MethodImplementationTranspiler {
83154
83749
  after += `let ${varPrefixed} = ${unique}?.${varName};\n`;
83155
83750
  }
83156
83751
  if (type instanceof abaplint.BasicTypes.NumericGenericType) {
83157
- after += `if (${varPrefixed}.constructor.name === "Character") {
83158
- ${varPrefixed} = ${new transpile_types_1.TranspileTypes().toType(identifier.getType())};
83159
- ${varPrefixed}.set(${unique}?.${varName});
83752
+ after += `if (${varPrefixed}.constructor.name === "Character") {
83753
+ ${varPrefixed} = ${new transpile_types_1.TranspileTypes().toType(identifier.getType())};
83754
+ ${varPrefixed}.set(${unique}?.${varName});
83160
83755
  }\n`;
83161
83756
  }
83162
83757
  }
@@ -83719,8 +84314,8 @@ class RaiseTranspiler {
83719
84314
  const extra = `{"INTERNAL_FILENAME": "${traversal.getFilename()}","INTERNAL_LINE": ${node.getStart().getRow()}}`;
83720
84315
  const lookup = traversal.lookupClassOrInterface(classNameToken?.getStr(), classNameToken);
83721
84316
  const id = unique_identifier_1.UniqueIdentifier.get();
83722
- return new chunk_1.Chunk().append(`const ${id} = await (new ${lookup}()).constructor_(${p});
83723
- ${id}.EXTRA_CX = ${extra};
84317
+ return new chunk_1.Chunk().append(`const ${id} = await (new ${lookup}()).constructor_(${p});
84318
+ ${id}.EXTRA_CX = ${extra};
83724
84319
  throw ${id};`, node, traversal);
83725
84320
  }
83726
84321
  }
@@ -84372,19 +84967,19 @@ class SelectTranspiler {
84372
84967
  if (keys.length > 0) {
84373
84968
  by = JSON.stringify(keys);
84374
84969
  }
84375
- const code = `if (${faeTranspiled}.array().length === 0) {
84376
- throw new Error("FAE, todo, empty table");
84377
- } else {
84378
- const ${unique2} = ${faeTranspiled}.array();
84379
- abap.statements.clear(${target});
84380
- for await (const ${unique} of ${unique2}) {
84381
- await abap.statements.select(${target}, {select: "${select.trim()}"${extra}}, {appending: true});
84382
- }
84383
- if (!(${target} instanceof abap.types.HashedTable) && ${target}.getOptions()?.primaryKey?.type !== "SORTED") {
84384
- abap.statements.sort(${target}, {by: ${by}.map(k => { return {component: k}; })});
84385
- await abap.statements.deleteInternal(${target}, {adjacent: true, by: ${by}});
84386
- }
84387
- abap.builtin.sy.get().dbcnt.set(${target}.getArrayLength());
84970
+ const code = `if (${faeTranspiled}.array().length === 0) {
84971
+ throw new Error("FAE, todo, empty table");
84972
+ } else {
84973
+ const ${unique2} = ${faeTranspiled}.array();
84974
+ abap.statements.clear(${target});
84975
+ for await (const ${unique} of ${unique2}) {
84976
+ await abap.statements.select(${target}, {select: "${select.trim()}"${extra}}, {appending: true});
84977
+ }
84978
+ if (!(${target} instanceof abap.types.HashedTable) && ${target}.getOptions()?.primaryKey?.type !== "SORTED") {
84979
+ abap.statements.sort(${target}, {by: ${by}.map(k => { return {component: k}; })});
84980
+ await abap.statements.deleteInternal(${target}, {adjacent: true, by: ${by}});
84981
+ }
84982
+ abap.builtin.sy.get().dbcnt.set(${target}.getArrayLength());
84388
84983
  }`;
84389
84984
  return new chunk_1.Chunk().append(code, node, traversal);
84390
84985
  }
@@ -85323,11 +85918,11 @@ class WhileTranspiler {
85323
85918
  const cond = new expressions_1.CondTranspiler().transpile(node.findFirstExpression(abaplint.Expressions.Cond), traversal);
85324
85919
  const unique = unique_identifier_1.UniqueIdentifier.get();
85325
85920
  return new chunk_1.Chunk()
85326
- .append(`const ${this.syIndexBackup} = abap.builtin.sy.get().index.get();
85327
- let ${unique} = 1;
85921
+ .append(`const ${this.syIndexBackup} = abap.builtin.sy.get().index.get();
85922
+ let ${unique} = 1;
85328
85923
  while (`, node, traversal)
85329
85924
  .appendChunk(cond)
85330
- .appendString(`) {
85925
+ .appendString(`) {
85331
85926
  abap.builtin.sy.get().index.set(${unique}++);`);
85332
85927
  }
85333
85928
  }
@@ -85434,7 +86029,6 @@ class AtTranspiler {
85434
86029
  suffix = "";
85435
86030
  }
85436
86031
  if (concat?.startsWith("AT NEW ")) {
85437
- // eslint-disable-next-line max-len
85438
86032
  ret.appendString(`if (${previous} === undefined || abap.compare.eq(${previous}${suffix}, ${loopTarget}${suffix}) === false) {\n`);
85439
86033
  const body = node.findDirectStructure(abaplint.Structures.Body);
85440
86034
  if (body) {
@@ -85450,7 +86044,6 @@ class AtTranspiler {
85450
86044
  ret.appendString(`${next} = ${loop.getTarget()};\n`);
85451
86045
  ret.appendString(`break;\n`);
85452
86046
  ret.appendString(`}\n`);
85453
- // eslint-disable-next-line max-len
85454
86047
  ret.appendString(`if (${next} === undefined || abap.compare.eq(${next}${suffix}, ${loopTarget}${suffix}) === false) {\n`);
85455
86048
  const body = node.findDirectStructure(abaplint.Structures.Body);
85456
86049
  if (body) {
@@ -85676,17 +86269,17 @@ class ClassDefinitionTranspiler {
85676
86269
  }
85677
86270
  else {
85678
86271
  // its an abstract class with only abstract methods
85679
- return new chunk_1.Chunk(`
85680
- class ${className?.toLowerCase()} {
85681
- static INTERNAL_TYPE = 'CLAS';
85682
- static IMPLEMENTED_INTERFACES = [];
85683
- static INTERNAL_NAME = 'ABSTRACT_CLASS_INTERNAL_NAME';
85684
- static ATTRIBUTES = {};
85685
- async constructor_() {
85686
- this.me = new abap.types.ABAPObject();
85687
- this.me.set(this);
85688
- return this;
85689
- }
86272
+ return new chunk_1.Chunk(`
86273
+ class ${className?.toLowerCase()} {
86274
+ static INTERNAL_TYPE = 'CLAS';
86275
+ static IMPLEMENTED_INTERFACES = [];
86276
+ static INTERNAL_NAME = 'ABSTRACT_CLASS_INTERNAL_NAME';
86277
+ static ATTRIBUTES = {};
86278
+ async constructor_() {
86279
+ this.me = new abap.types.ABAPObject();
86280
+ this.me.set(this);
86281
+ return this;
86282
+ }
85690
86283
  }`);
85691
86284
  }
85692
86285
  }
@@ -86066,8 +86659,8 @@ class FunctionModuleTranspiler {
86066
86659
  const type = scope?.findVariable(name)?.getType();
86067
86660
  if (type !== undefined && p.optional === true) {
86068
86661
  // todo, set DEFAULT value
86069
- ret += `if (${name} === undefined) {
86070
- ${name} = ${new transpile_types_1.TranspileTypes().toType(type)};
86662
+ ret += `if (${name} === undefined) {
86663
+ ${name} = ${new transpile_types_1.TranspileTypes().toType(type)};
86071
86664
  }\n`;
86072
86665
  }
86073
86666
  }
@@ -86355,7 +86948,6 @@ exports.ModuleTranspiler = ModuleTranspiler;
86355
86948
 
86356
86949
  Object.defineProperty(exports, "__esModule", ({ value: true }));
86357
86950
  exports.SelectTranspiler = void 0;
86358
- /* eslint-disable max-len */
86359
86951
  const abaplint = __webpack_require__(/*! @abaplint/core */ "./node_modules/@abaplint/core/build/src/index.js");
86360
86952
  const select_1 = __webpack_require__(/*! ../statements/select */ "./node_modules/@abaplint/transpiler/build/src/statements/select.js");
86361
86953
  const chunk_1 = __webpack_require__(/*! ../chunk */ "./node_modules/@abaplint/transpiler/build/src/chunk.js");
@@ -86380,10 +86972,10 @@ class SelectTranspiler {
86380
86972
  const packageSize = node.findFirstExpression(abaplint.Expressions.SelectLoop)?.findExpressionAfterToken("SIZE");
86381
86973
  if (packageSize) {
86382
86974
  const getSize = new expressions_1.SQLSourceTranspiler().transpile(packageSize, traversal).getCode() + ".get()";
86383
- ret.appendString(`if (${targetName}.array().length > ${getSize}) {
86384
- throw new Error("PACKAGE SIZED loop larger than package size not supported");
86385
- };
86386
- abap.statements.append({source: ${targetName}, target: ${intoName}, lines: true});
86975
+ ret.appendString(`if (${targetName}.array().length > ${getSize}) {
86976
+ throw new Error("PACKAGE SIZED loop larger than package size not supported");
86977
+ };
86978
+ abap.statements.append({source: ${targetName}, target: ${intoName}, lines: true});
86387
86979
  {\n`);
86388
86980
  }
86389
86981
  else if (concat.includes(" INTO CORRESPONDING FIELDS OF ")) {
@@ -87533,16 +88125,16 @@ class UnitTest {
87533
88125
  initializationScript(reg, dbSetup, extraSetup, useImport) {
87534
88126
  let ret = "";
87535
88127
  if (useImport === true) {
87536
- ret = `/* eslint-disable import/newline-after-import */
88128
+ ret = `/* eslint-disable import/newline-after-import */
87537
88129
  import "./_top.mjs";\n`;
87538
88130
  }
87539
88131
  else {
87540
- ret = `/* eslint-disable import/newline-after-import */
87541
- import runtime from "@abaplint/runtime";
88132
+ ret = `/* eslint-disable import/newline-after-import */
88133
+ import runtime from "@abaplint/runtime";
87542
88134
  globalThis.abap = new runtime.ABAP();\n`;
87543
88135
  }
87544
- ret += `${this.buildImports(reg, useImport)}
87545
-
88136
+ ret += `${this.buildImports(reg, useImport)}
88137
+
87546
88138
  export async function initializeABAP() {\n`;
87547
88139
  ret += ` const sqlite = [];\n`;
87548
88140
  for (const i of dbSetup.schemas.sqlite) {
@@ -87579,19 +88171,19 @@ export async function initializeABAP() {\n`;
87579
88171
  return filename.replace(/\//g, "%23");
87580
88172
  }
87581
88173
  unitTestScriptOpen(reg, _skip) {
87582
- let ret = `/* eslint-disable curly */
87583
- import fs from "fs";
87584
- import path from "path";
87585
- import {fileURLToPath} from "url";
87586
- import {initializeABAP} from "./init.mjs";
87587
-
87588
- const __dirname = path.dirname(fileURLToPath(import.meta.url));
87589
-
87590
- async function run() {
87591
- await initializeABAP();
87592
- let lt_input = new abap.types.Table(new abap.types.Structure({class_name: new abap.types.Character(30), testclass_name: new abap.types.Character(30), method_name: new abap.types.Character(30)}), {"withHeader":false,"type":"STANDARD","isUnique":false,"keyFields":[]});
87593
- let ls_input = new abap.types.Structure({class_name: new abap.types.Character(30), testclass_name: new abap.types.Character(30), method_name: new abap.types.Character(30)});
87594
- let ls_result = new abap.types.Structure({list: new abap.types.Table(new abap.types.Structure({class_name: new abap.types.Character(30), testclass_name: new abap.types.Character(30), method_name: new abap.types.Character(30), expected: new abap.types.String(), actual: new abap.types.String(), status: new abap.types.String(), runtime: new abap.types.Integer(), message: new abap.types.String(), js_location: new abap.types.String(), console: new abap.types.String()}), {"withHeader":false,"type":"STANDARD","isUnique":false,"keyFields":[]}), json: new abap.types.String()});
88174
+ let ret = `/* eslint-disable curly */
88175
+ import fs from "fs";
88176
+ import path from "path";
88177
+ import {fileURLToPath} from "url";
88178
+ import {initializeABAP} from "./init.mjs";
88179
+
88180
+ const __dirname = path.dirname(fileURLToPath(import.meta.url));
88181
+
88182
+ async function run() {
88183
+ await initializeABAP();
88184
+ let lt_input = new abap.types.Table(new abap.types.Structure({class_name: new abap.types.Character(30), testclass_name: new abap.types.Character(30), method_name: new abap.types.Character(30)}), {"withHeader":false,"type":"STANDARD","isUnique":false,"keyFields":[]});
88185
+ let ls_input = new abap.types.Structure({class_name: new abap.types.Character(30), testclass_name: new abap.types.Character(30), method_name: new abap.types.Character(30)});
88186
+ let ls_result = new abap.types.Structure({list: new abap.types.Table(new abap.types.Structure({class_name: new abap.types.Character(30), testclass_name: new abap.types.Character(30), method_name: new abap.types.Character(30), expected: new abap.types.String(), actual: new abap.types.String(), status: new abap.types.String(), runtime: new abap.types.Integer(), message: new abap.types.String(), js_location: new abap.types.String(), console: new abap.types.String()}), {"withHeader":false,"type":"STANDARD","isUnique":false,"keyFields":[]}), json: new abap.types.String()});
87595
88187
  `;
87596
88188
  for (const obj of reg.getObjects()) {
87597
88189
  if (reg.isDependency(obj) || !(obj instanceof abaplint.Objects.Class)) {
@@ -87611,25 +88203,25 @@ async function run() {
87611
88203
  if (m.isForTesting === false) {
87612
88204
  continue;
87613
88205
  }
87614
- ret += ` ls_input.get().class_name.set("${obj.getName()}");
87615
- ls_input.get().testclass_name.set("${def.name.toUpperCase()}");
87616
- ls_input.get().method_name.set("${m.name.toUpperCase()}");
88206
+ ret += ` ls_input.get().class_name.set("${obj.getName()}");
88207
+ ls_input.get().testclass_name.set("${def.name.toUpperCase()}");
88208
+ ls_input.get().method_name.set("${m.name.toUpperCase()}");
87617
88209
  abap.statements.append({source: ls_input, target: lt_input});\n`;
87618
88210
  }
87619
88211
  }
87620
88212
  }
87621
88213
  }
87622
- ret += `
87623
-
87624
- ls_result.set(await abap.Classes["KERNEL_UNIT_RUNNER"].run({it_input: lt_input}));
87625
- fs.writeFileSync(__dirname + path.sep + "output.json", ls_result.get().json.get());
87626
- }
87627
-
87628
- run().then(() => {
87629
- process.exit(0);
87630
- }).catch((err) => {
87631
- console.log(err);
87632
- process.exit(1);
88214
+ ret += `
88215
+
88216
+ ls_result.set(await abap.Classes["KERNEL_UNIT_RUNNER"].run({it_input: lt_input}));
88217
+ fs.writeFileSync(__dirname + path.sep + "output.json", ls_result.get().json.get());
88218
+ }
88219
+
88220
+ run().then(() => {
88221
+ process.exit(0);
88222
+ }).catch((err) => {
88223
+ console.log(err);
88224
+ process.exit(1);
87633
88225
  });`;
87634
88226
  return ret;
87635
88227
  }
@@ -87717,29 +88309,29 @@ run().then(() => {
87717
88309
  return tests;
87718
88310
  }
87719
88311
  unitTestScript(reg, skip) {
87720
- let ret = `/* eslint-disable curly */
87721
- import fs from "fs";
87722
- import path from "path";
87723
- import {fileURLToPath} from "url";
87724
- import {initializeABAP} from "./init.mjs";
87725
- import runtime from "@abaplint/runtime";
87726
-
87727
- const __dirname = path.dirname(fileURLToPath(import.meta.url));
87728
-
87729
- async function run() {
87730
- await initializeABAP();
87731
- const unit = new runtime.UnitTestResult();
87732
- let clas;
87733
- let locl;
87734
- let meth;
88312
+ let ret = `/* eslint-disable curly */
88313
+ import fs from "fs";
88314
+ import path from "path";
88315
+ import {fileURLToPath} from "url";
88316
+ import {initializeABAP} from "./init.mjs";
88317
+ import runtime from "@abaplint/runtime";
88318
+
88319
+ const __dirname = path.dirname(fileURLToPath(import.meta.url));
88320
+
88321
+ async function run() {
88322
+ await initializeABAP();
88323
+ const unit = new runtime.UnitTestResult();
88324
+ let clas;
88325
+ let locl;
88326
+ let meth;
87735
88327
  try {\n`;
87736
88328
  for (const st of this.getSortedTests(reg)) {
87737
88329
  ret += `// --------------------------------------------\n`;
87738
88330
  ret += ` clas = unit.addObject("${st.obj.getName()}");\n`;
87739
88331
  const lc = st.localClass.toLowerCase();
87740
- ret += ` {
87741
- const {${lc}} = await import("./${this.escapeNamespace(st.obj.getName().toLowerCase())}.${st.obj.getType().toLowerCase()}.testclasses.mjs");
87742
- locl = clas.addTestClass("${lc}");
88332
+ ret += ` {
88333
+ const {${lc}} = await import("./${this.escapeNamespace(st.obj.getName().toLowerCase())}.${st.obj.getType().toLowerCase()}.testclasses.mjs");
88334
+ locl = clas.addTestClass("${lc}");
87743
88335
  if (${lc}.class_setup) await ${lc}.class_setup();\n`;
87744
88336
  for (const m of st.methods) {
87745
88337
  const skipThis = (skip || []).some(a => a.object === st.obj.getName() && a.class === lc && a.method === m);
@@ -87814,22 +88406,22 @@ async function run() {
87814
88406
  }
87815
88407
  }
87816
88408
  */
87817
- ret += `// -------------------END-------------------
87818
- fs.writeFileSync(__dirname + path.sep + "_output.xml", unit.xUnitXML());
87819
- } catch (e) {
87820
- if (meth) {
87821
- meth.fail();
87822
- }
87823
- fs.writeFileSync(__dirname + path.sep + "_output.xml", unit.xUnitXML());
87824
- throw e;
87825
- }
87826
- }
87827
-
87828
- run().then(() => {
87829
- process.exit(0);
87830
- }).catch((err) => {
87831
- console.log(err);
87832
- process.exit(1);
88409
+ ret += `// -------------------END-------------------
88410
+ fs.writeFileSync(__dirname + path.sep + "_output.xml", unit.xUnitXML());
88411
+ } catch (e) {
88412
+ if (meth) {
88413
+ meth.fail();
88414
+ }
88415
+ fs.writeFileSync(__dirname + path.sep + "_output.xml", unit.xUnitXML());
88416
+ throw e;
88417
+ }
88418
+ }
88419
+
88420
+ run().then(() => {
88421
+ process.exit(0);
88422
+ }).catch((err) => {
88423
+ console.log(err);
88424
+ process.exit(1);
87833
88425
  });`;
87834
88426
  return ret;
87835
88427
  }
@@ -101101,7 +101693,7 @@ var lib = JSON5;
101101
101693
  /******/
101102
101694
  /************************************************************************/
101103
101695
  var __webpack_exports__ = {};
101104
- // This entry need to be wrapped in an IIFE because it need to be in strict mode.
101696
+ // This entry needs to be wrapped in an IIFE because it needs to be in strict mode.
101105
101697
  (() => {
101106
101698
  "use strict";
101107
101699
  var exports = __webpack_exports__;
@@ -101238,7 +101830,7 @@ async function run() {
101238
101830
  fs.writeFileSync(outputFolder + path.sep + "init.mjs", output.initializationScript);
101239
101831
  // new static referenced imports,
101240
101832
  fs.writeFileSync(outputFolder + path.sep + "_init.mjs", output.initializationScript2);
101241
- fs.writeFileSync(outputFolder + path.sep + "_top.mjs", `import runtime from "@abaplint/runtime";
101833
+ fs.writeFileSync(outputFolder + path.sep + "_top.mjs", `import runtime from "@abaplint/runtime";
101242
101834
  globalThis.abap = new runtime.ABAP();`);
101243
101835
  }
101244
101836
  run().then(() => {