@abaplint/transpiler-cli 2.12.11 → 2.12.13

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.
Files changed (2) hide show
  1. package/build/bundle.js +319 -126
  2. package/package.json +3 -3
package/build/bundle.js CHANGED
@@ -4934,7 +4934,6 @@ __exportStar(__webpack_require__(/*! ./sql_arithmetic_operator */ "./node_module
4934
4934
  __exportStar(__webpack_require__(/*! ./sql_arithmetics */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_arithmetics.js"), exports);
4935
4935
  __exportStar(__webpack_require__(/*! ./sql_as_name */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_as_name.js"), exports);
4936
4936
  __exportStar(__webpack_require__(/*! ./sql_case */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_case.js"), exports);
4937
- __exportStar(__webpack_require__(/*! ./sql_cast */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_cast.js"), exports);
4938
4937
  __exportStar(__webpack_require__(/*! ./sql_cds_parameters */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_cds_parameters.js"), exports);
4939
4938
  __exportStar(__webpack_require__(/*! ./sql_client */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_client.js"), exports);
4940
4939
  __exportStar(__webpack_require__(/*! ./sql_compare_operator */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_compare_operator.js"), exports);
@@ -7085,33 +7084,6 @@ exports.SQLCase = SQLCase;
7085
7084
 
7086
7085
  /***/ }),
7087
7086
 
7088
- /***/ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_cast.js":
7089
- /*!*****************************************************************************************!*\
7090
- !*** ./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_cast.js ***!
7091
- \*****************************************************************************************/
7092
- /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
7093
-
7094
- "use strict";
7095
-
7096
- Object.defineProperty(exports, "__esModule", ({ value: true }));
7097
- exports.SQLCast = void 0;
7098
- const _1 = __webpack_require__(/*! . */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js");
7099
- const version_1 = __webpack_require__(/*! ../../../version */ "./node_modules/@abaplint/core/build/src/version.js");
7100
- const tokens_1 = __webpack_require__(/*! ../../1_lexer/tokens */ "./node_modules/@abaplint/core/build/src/abap/1_lexer/tokens/index.js");
7101
- const combi_1 = __webpack_require__(/*! ../combi */ "./node_modules/@abaplint/core/build/src/abap/2_statements/combi.js");
7102
- const sql_field_name_1 = __webpack_require__(/*! ./sql_field_name */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_field_name.js");
7103
- class SQLCast extends combi_1.Expression {
7104
- getRunnable() {
7105
- const abap = (0, combi_1.ver)(version_1.Version.v740sp05, (0, combi_1.seq)((0, combi_1.tok)(tokens_1.WAt), _1.SimpleFieldChain2), version_1.Version.OpenABAP);
7106
- // todo: from version something
7107
- return (0, combi_1.seq)("CAST", "(", (0, combi_1.opt)((0, combi_1.altPrio)(sql_field_name_1.SQLFieldName, abap)), "AS", sql_field_name_1.SQLFieldName, ")");
7108
- }
7109
- }
7110
- exports.SQLCast = SQLCast;
7111
- //# sourceMappingURL=sql_cast.js.map
7112
-
7113
- /***/ }),
7114
-
7115
7087
  /***/ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_cds_parameters.js":
7116
7088
  /*!***************************************************************************************************!*\
7117
7089
  !*** ./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_cds_parameters.js ***!
@@ -7266,11 +7238,14 @@ class SQLField extends combi_1.Expression {
7266
7238
  getRunnable() {
7267
7239
  const abap = (0, combi_1.ver)(version_1.Version.v740sp05, (0, combi_1.seq)((0, combi_1.tok)(tokens_1.WAt), _1.SimpleFieldChain2), version_1.Version.OpenABAP);
7268
7240
  const as = (0, combi_1.seq)("AS", _1.SQLAsName);
7269
- const paren = (0, combi_1.seq)((0, combi_1.tok)(tokens_1.WParenLeftW), _1.SQLFieldName, (0, combi_1.altPrio)((0, combi_1.tok)(tokens_1.WParenRightW), (0, combi_1.tok)(tokens_1.WParenRight)));
7270
- const field = (0, combi_1.altPrio)(_1.SQLAggregation, _1.SQLCase, _1.SQLCast, sql_function_1.SQLFunction, sql_path_1.SQLPath, _1.SQLFieldName, abap, _1.Constant, paren);
7271
- const sub = (0, combi_1.plusPrio)((0, combi_1.seq)((0, combi_1.altPrio)("+", "-", "*", "/", "&&"), (0, combi_1.optPrio)((0, combi_1.tok)(tokens_1.WParenLeftW)), field, (0, combi_1.optPrio)((0, combi_1.tok)(tokens_1.WParenRightW))));
7241
+ const parenFieldName = (0, combi_1.seq)((0, combi_1.tok)(tokens_1.WParenLeftW), _1.SQLFieldName, (0, combi_1.altPrio)((0, combi_1.tok)(tokens_1.WParenRightW), (0, combi_1.tok)(tokens_1.WParenRight)));
7242
+ const field = (0, combi_1.altPrio)(_1.SQLAggregation, _1.SQLCase, sql_function_1.SQLFunction, sql_path_1.SQLPath, _1.SQLFieldName, abap, _1.Constant, parenFieldName);
7243
+ const parenField = (0, combi_1.seq)((0, combi_1.tok)(tokens_1.WParenLeftW), field, (0, combi_1.tok)(tokens_1.WParenRightW));
7244
+ const sub = (0, combi_1.plusPrio)((0, combi_1.seq)((0, combi_1.altPrio)("+", "-", "*", "/", "&&"), (0, combi_1.altPrio)(parenField, field)));
7272
7245
  const arith = (0, combi_1.ver)(version_1.Version.v740sp05, sub);
7273
- return (0, combi_1.seq)(field, (0, combi_1.optPrio)(arith), (0, combi_1.optPrio)(as));
7246
+ const arithSequence = (0, combi_1.seq)(field, (0, combi_1.optPrio)(arith));
7247
+ const parenArithSequence = (0, combi_1.seq)((0, combi_1.tok)(tokens_1.WParenLeftW), arithSequence, (0, combi_1.tok)(tokens_1.WParenRightW));
7248
+ return (0, combi_1.seq)((0, combi_1.altPrio)(parenArithSequence, arithSequence), (0, combi_1.optPrio)(as));
7274
7249
  }
7275
7250
  }
7276
7251
  exports.SQLField = SQLField;
@@ -7530,10 +7505,11 @@ const integer_1 = __webpack_require__(/*! ./integer */ "./node_modules/@abaplint
7530
7505
  const sql_function_input_1 = __webpack_require__(/*! ./sql_function_input */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_function_input.js");
7531
7506
  class SQLFunction extends combi_1.Expression {
7532
7507
  getRunnable() {
7533
- const castTypes = (0, combi_1.altPrio)((0, combi_1.seq)("CHAR", (0, combi_1.optPrio)((0, combi_1.seq)((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)), (0, combi_1.seq)("NUMC", (0, combi_1.optPrio)((0, combi_1.seq)((0, combi_1.tok)(tokens_1.ParenLeftW), integer_1.Integer, (0, combi_1.tok)(tokens_1.WParenRightW)))), "FLTP", "INT2", "INT4", "INT8");
7508
+ const castTypes = (0, combi_1.altPrio)((0, combi_1.seq)("CHAR", (0, combi_1.optPrio)((0, combi_1.seq)((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)), (0, combi_1.seq)("NUMC", (0, combi_1.optPrio)((0, combi_1.seq)((0, combi_1.tok)(tokens_1.ParenLeftW), integer_1.Integer, (0, combi_1.tok)(tokens_1.WParenRightW)))), "DATS", "FLTP", "INT2", "INT4", "INT8");
7534
7509
  const commaParam = (0, combi_1.seq)(",", sql_function_input_1.SQLFunctionInput);
7535
7510
  // note: the function names are not keywords, they are usually in lower case
7536
7511
  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)));
7512
+ // yea, 750 is correct, but it also works technically in version v740sp05
7537
7513
  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)));
7538
7514
  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)));
7539
7515
  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)));
@@ -10728,17 +10704,18 @@ class Convert {
10728
10704
  const intoTime = (0, combi_1.seq)("TIME", expressions_1.Target);
10729
10705
  const intoDate = (0, combi_1.seq)("DATE", expressions_1.Target);
10730
10706
  const into = (0, combi_1.seq)("INTO", (0, combi_1.per)(intoTime, intoDate));
10731
- const daylight = (0, combi_1.seq)("DAYLIGHT SAVING TIME", expressions_1.Source);
10707
+ const daylightSource = (0, combi_1.seq)("DAYLIGHT SAVING TIME", expressions_1.Source);
10708
+ const daylightTarget = (0, combi_1.seq)("DAYLIGHT SAVING TIME", expressions_1.Target);
10732
10709
  const zone = (0, combi_1.seq)("TIME ZONE", expressions_1.Source);
10733
- const time = (0, combi_1.seq)("TIME STAMP", expressions_1.Source, (0, combi_1.per)(zone, into, daylight));
10710
+ const time = (0, combi_1.seq)("TIME STAMP", expressions_1.Source, (0, combi_1.per)(zone, into, daylightTarget));
10734
10711
  const dat = (0, combi_1.seq)("DATE", expressions_1.Source);
10735
10712
  const tim = (0, combi_1.seq)("TIME", expressions_1.Source);
10736
10713
  const stamp = (0, combi_1.seq)("INTO TIME STAMP", expressions_1.Target);
10737
10714
  const intoutc = (0, combi_1.ver)(version_1.Version.v754, (0, combi_1.seq)("INTO UTCLONG", expressions_1.Target));
10738
10715
  const invert = (0, combi_1.seq)("INTO INVERTED-DATE", expressions_1.Target);
10739
- const date = (0, combi_1.seq)((0, combi_1.per)(dat, tim), (0, combi_1.per)(daylight, stamp, zone, invert, intoutc));
10716
+ const date = (0, combi_1.seq)((0, combi_1.per)(dat, tim), (0, combi_1.per)(daylightSource, stamp, zone, invert, intoutc));
10740
10717
  const inv = (0, combi_1.seq)("INVERTED-DATE", expressions_1.Source, "INTO DATE", expressions_1.Target);
10741
- const utclong = (0, combi_1.ver)(version_1.Version.v754, (0, combi_1.seq)("UTCLONG", expressions_1.Source, (0, combi_1.per)(zone, into, daylight)));
10718
+ const utclong = (0, combi_1.ver)(version_1.Version.v754, (0, combi_1.seq)("UTCLONG", expressions_1.Source, (0, combi_1.per)(zone, into, daylightSource)));
10742
10719
  return (0, combi_1.seq)("CONVERT", (0, combi_1.alt)(time, date, inv, utclong));
10743
10720
  }
10744
10721
  }
@@ -19600,33 +19577,21 @@ exports.Identifier = Identifier;
19600
19577
  /*!************************************************************************************************!*\
19601
19578
  !*** ./node_modules/@abaplint/core/build/src/abap/4_file_information/abap_file_information.js ***!
19602
19579
  \************************************************************************************************/
19603
- /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
19580
+ /***/ ((__unused_webpack_module, exports) => {
19604
19581
 
19605
19582
  "use strict";
19606
19583
 
19607
19584
  Object.defineProperty(exports, "__esModule", ({ value: true }));
19608
19585
  exports.ABAPFileInformation = void 0;
19609
- const Structures = __webpack_require__(/*! ../3_structures/structures */ "./node_modules/@abaplint/core/build/src/abap/3_structures/structures/index.js");
19610
- const Expressions = __webpack_require__(/*! ../2_statements/expressions */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js");
19611
- const Statements = __webpack_require__(/*! ../2_statements/statements */ "./node_modules/@abaplint/core/build/src/abap/2_statements/statements/index.js");
19612
- const _abap_file_information_1 = __webpack_require__(/*! ./_abap_file_information */ "./node_modules/@abaplint/core/build/src/abap/4_file_information/_abap_file_information.js");
19613
- const _identifier_1 = __webpack_require__(/*! ./_identifier */ "./node_modules/@abaplint/core/build/src/abap/4_file_information/_identifier.js");
19614
- const Tokens = __webpack_require__(/*! ../1_lexer/tokens */ "./node_modules/@abaplint/core/build/src/abap/1_lexer/tokens/index.js");
19615
- const visibility_1 = __webpack_require__(/*! ./visibility */ "./node_modules/@abaplint/core/build/src/abap/4_file_information/visibility.js");
19616
19586
  class ABAPFileInformation {
19617
- constructor(structure, filename) {
19618
- this.forms = [];
19619
- this.implementations = [];
19620
- this.interfaces = [];
19621
- this.classes = [];
19622
- this.filename = filename;
19623
- this.parse(structure);
19587
+ constructor(parsed) {
19588
+ this.parsed = parsed;
19624
19589
  }
19625
19590
  listClassImplementations() {
19626
- return this.implementations;
19591
+ return this.parsed.implementations;
19627
19592
  }
19628
19593
  listInterfaceDefinitions() {
19629
- return this.interfaces;
19594
+ return this.parsed.interfaces;
19630
19595
  }
19631
19596
  getInterfaceDefinitionByName(name) {
19632
19597
  const upper = name.toUpperCase();
@@ -19638,7 +19603,7 @@ class ABAPFileInformation {
19638
19603
  return undefined;
19639
19604
  }
19640
19605
  listClassDefinitions() {
19641
- return this.classes;
19606
+ return this.parsed.classes;
19642
19607
  }
19643
19608
  getClassDefinitionByName(name) {
19644
19609
  const upper = name.toUpperCase();
@@ -19659,16 +19624,54 @@ class ABAPFileInformation {
19659
19624
  return undefined;
19660
19625
  }
19661
19626
  listFormDefinitions() {
19662
- return this.forms;
19627
+ return this.parsed.forms;
19628
+ }
19629
+ }
19630
+ exports.ABAPFileInformation = ABAPFileInformation;
19631
+ //# sourceMappingURL=abap_file_information.js.map
19632
+
19633
+ /***/ }),
19634
+
19635
+ /***/ "./node_modules/@abaplint/core/build/src/abap/4_file_information/abap_file_information_parser.js":
19636
+ /*!*******************************************************************************************************!*\
19637
+ !*** ./node_modules/@abaplint/core/build/src/abap/4_file_information/abap_file_information_parser.js ***!
19638
+ \*******************************************************************************************************/
19639
+ /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
19640
+
19641
+ "use strict";
19642
+
19643
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
19644
+ exports.ABAPFileInformationParser = void 0;
19645
+ const Structures = __webpack_require__(/*! ../3_structures/structures */ "./node_modules/@abaplint/core/build/src/abap/3_structures/structures/index.js");
19646
+ const Expressions = __webpack_require__(/*! ../2_statements/expressions */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js");
19647
+ const Statements = __webpack_require__(/*! ../2_statements/statements */ "./node_modules/@abaplint/core/build/src/abap/2_statements/statements/index.js");
19648
+ const _identifier_1 = __webpack_require__(/*! ./_identifier */ "./node_modules/@abaplint/core/build/src/abap/4_file_information/_identifier.js");
19649
+ const Tokens = __webpack_require__(/*! ../1_lexer/tokens */ "./node_modules/@abaplint/core/build/src/abap/1_lexer/tokens/index.js");
19650
+ const visibility_1 = __webpack_require__(/*! ./visibility */ "./node_modules/@abaplint/core/build/src/abap/4_file_information/visibility.js");
19651
+ const _abap_file_information_1 = __webpack_require__(/*! ./_abap_file_information */ "./node_modules/@abaplint/core/build/src/abap/4_file_information/_abap_file_information.js");
19652
+ class ABAPFileInformationParser {
19653
+ constructor(filename) {
19654
+ this.filename = filename;
19663
19655
  }
19664
- ///////////////////////
19665
19656
  parse(structure) {
19666
- var _a;
19657
+ const result = {
19658
+ interfaces: [],
19659
+ classes: [],
19660
+ forms: [],
19661
+ implementations: [],
19662
+ };
19667
19663
  if (structure === undefined) {
19668
- return;
19664
+ return result;
19669
19665
  }
19670
- this.parseClasses(structure);
19671
- this.parseInterfaces(structure);
19666
+ result.classes = this.parseClasses(structure);
19667
+ result.interfaces = this.parseInterfaces(structure);
19668
+ result.implementations = this.parseClassImplementations(structure);
19669
+ result.forms = this.parseForms(structure);
19670
+ return result;
19671
+ }
19672
+ parseClassImplementations(structure) {
19673
+ var _a;
19674
+ const implementations = [];
19672
19675
  for (const found of structure.findAllStructures(Structures.ClassImplementation)) {
19673
19676
  const methods = [];
19674
19677
  for (const method of found.findAllStructures(Structures.Method)) {
@@ -19678,24 +19681,30 @@ class ABAPFileInformation {
19678
19681
  }
19679
19682
  }
19680
19683
  const name = found.findFirstStatement(Statements.ClassImplementation).findFirstExpression(Expressions.ClassName).getFirstToken();
19681
- this.implementations.push({
19684
+ implementations.push({
19682
19685
  name: name.getStr(),
19683
19686
  identifier: new _identifier_1.Identifier(name, this.filename),
19684
19687
  methods,
19685
19688
  });
19686
19689
  }
19690
+ return implementations;
19691
+ }
19692
+ parseForms(structure) {
19693
+ const forms = [];
19687
19694
  for (const statement of structure.findAllStructures(Structures.Form)) {
19688
19695
  // FORMs can contain a dash in the name
19689
19696
  const pos = statement.findFirstExpression(Expressions.FormName).getFirstToken().getStart();
19690
19697
  const name = statement.findFirstExpression(Expressions.FormName).concatTokens();
19691
19698
  const nameToken = new Tokens.Identifier(pos, name);
19692
- this.forms.push({
19699
+ forms.push({
19693
19700
  name: nameToken.getStr(),
19694
19701
  identifier: new _identifier_1.Identifier(nameToken, this.filename),
19695
19702
  });
19696
19703
  }
19704
+ return forms;
19697
19705
  }
19698
19706
  parseInterfaces(structure) {
19707
+ const interfaces = [];
19699
19708
  for (const found of structure.findDirectStructures(Structures.Interface)) {
19700
19709
  const i = found.findFirstStatement(Statements.Interface);
19701
19710
  if (i === undefined) {
@@ -19707,7 +19716,7 @@ class ABAPFileInformation {
19707
19716
  const aliases = this.parseAliases(found, visibility_1.Visibility.Public);
19708
19717
  const constants = this.parseConstants(found, visibility_1.Visibility.Public);
19709
19718
  const g = i.findDirectExpression(Expressions.ClassGlobal);
19710
- this.interfaces.push({
19719
+ interfaces.push({
19711
19720
  name: interfaceName.getStr(),
19712
19721
  identifier: new _identifier_1.Identifier(interfaceName, this.filename),
19713
19722
  isLocal: g === undefined,
@@ -19719,9 +19728,11 @@ class ABAPFileInformation {
19719
19728
  attributes,
19720
19729
  });
19721
19730
  }
19731
+ return interfaces;
19722
19732
  }
19723
19733
  parseClasses(structure) {
19724
19734
  var _a;
19735
+ const classes = [];
19725
19736
  for (const found of structure.findAllStructures(Structures.ClassDefinition)) {
19726
19737
  const className = found.findFirstStatement(Statements.ClassDefinition).findFirstExpression(Expressions.ClassName).getFirstToken();
19727
19738
  const methods = this.parseMethodDefinition(found.findFirstStructure(Structures.PublicSection), visibility_1.Visibility.Public);
@@ -19760,7 +19771,7 @@ class ABAPFileInformation {
19760
19771
  else if (concat.includes("DURATION MEDIUM")) {
19761
19772
  duration = _abap_file_information_1.Duration.medium;
19762
19773
  }
19763
- this.classes.push({
19774
+ classes.push({
19764
19775
  name: className.getStr(),
19765
19776
  identifier: new _identifier_1.Identifier(className, this.filename),
19766
19777
  isLocal: containsGlobal === undefined,
@@ -19779,6 +19790,7 @@ class ABAPFileInformation {
19779
19790
  constants,
19780
19791
  });
19781
19792
  }
19793
+ return classes;
19782
19794
  }
19783
19795
  ///////////////////
19784
19796
  getImplementing(input) {
@@ -19977,8 +19989,8 @@ class ABAPFileInformation {
19977
19989
  return ret;
19978
19990
  }
19979
19991
  }
19980
- exports.ABAPFileInformation = ABAPFileInformation;
19981
- //# sourceMappingURL=abap_file_information.js.map
19992
+ exports.ABAPFileInformationParser = ABAPFileInformationParser;
19993
+ //# sourceMappingURL=abap_file_information_parser.js.map
19982
19994
 
19983
19995
  /***/ }),
19984
19996
 
@@ -23101,7 +23113,6 @@ class BasicTypes {
23101
23113
  return undefined;
23102
23114
  }
23103
23115
  resolveLikeName(node, headerLogic = true) {
23104
- var _a;
23105
23116
  if (node === undefined) {
23106
23117
  return undefined;
23107
23118
  }
@@ -23147,7 +23158,12 @@ class BasicTypes {
23147
23158
  this.input.scope.addReference(chain === null || chain === void 0 ? void 0 : chain.getFirstToken(), found, _reference_1.ReferenceType.TypeReference, this.input.filename);
23148
23159
  }
23149
23160
  if (type === undefined) {
23150
- type = (_a = this.input.scope.getDDIC().lookupNoVoid(name)) === null || _a === void 0 ? void 0 : _a.type;
23161
+ const found = this.input.scope.getDDIC().lookupNoVoid(name);
23162
+ if (found !== undefined) {
23163
+ const using = { filename: this.input.filename, token: chain.getFirstToken(), object: found.object };
23164
+ this.input.scope.getDDICReferences().addUsing(this.input.scope.getParentObj(), using);
23165
+ }
23166
+ type = found === null || found === void 0 ? void 0 : found.type;
23151
23167
  }
23152
23168
  if (type === undefined && this.input.scope.isAnyOO() === false && this.input.scope.getDDIC().inErrorNamespace(name) === false) {
23153
23169
  this.input.scope.addReference(chain.getChildren()[0].getFirstToken(), undefined, _reference_1.ReferenceType.VoidType, this.input.filename);
@@ -24524,7 +24540,9 @@ class ComponentName {
24524
24540
  return ret;
24525
24541
  }
24526
24542
  }
24527
- input.issues.push((0, _syntax_input_1.syntaxIssue)(input, nameToken, "Not a structure, ComponentName, \"" + name + "\""));
24543
+ if (!(context instanceof Basic.UnknownType)) {
24544
+ input.issues.push((0, _syntax_input_1.syntaxIssue)(input, nameToken, "Not a structure, ComponentName, \"" + name + "\", (" + (context === null || context === void 0 ? void 0 : context.constructor.name) + ")"));
24545
+ }
24528
24546
  return Basic.VoidType.get(_syntax_input_1.CheckSyntaxKey);
24529
24547
  }
24530
24548
  }
@@ -26943,7 +26961,7 @@ const _syntax_input_1 = __webpack_require__(/*! ../_syntax_input */ "./node_modu
26943
26961
  const isSimple = /^\w+$/;
26944
26962
  class Select {
26945
26963
  static runSyntax(node, input, skipImplicitInto = false) {
26946
- var _a, _b;
26964
+ var _a;
26947
26965
  const token = node.getFirstToken();
26948
26966
  let from = node.findDirectExpression(Expressions.SQLFrom);
26949
26967
  if (from === undefined) {
@@ -26964,10 +26982,8 @@ class Select {
26964
26982
  input.issues.push((0, _syntax_input_1.syntaxIssue)(input, node.getFirstToken(), message));
26965
26983
  return;
26966
26984
  }
26967
- const isSingle = ((_a = node.getChildren()[1]) === null || _a === void 0 ? void 0 : _a.concatTokens().toUpperCase()) === "SINGLE"
26968
- || node.get() instanceof Expressions.SelectLoop;
26969
26985
  this.checkFields(fields, dbSources, input, node);
26970
- this.handleInto(node, input, fields, dbSources, isSingle);
26986
+ const intoExpression = this.handleInto(node, input, fields, dbSources);
26971
26987
  const fae = node.findDirectExpression(Expressions.SQLForAllEntries);
26972
26988
  if (fae) {
26973
26989
  input.scope.push(_scope_type_1.ScopeType.OpenSQL, "SELECT", token.getStart(), input.filename);
@@ -26981,7 +26997,7 @@ class Select {
26981
26997
  && node.findDirectExpression(Expressions.SQLIntoTable) === undefined
26982
26998
  && node.findDirectExpression(Expressions.SQLIntoList) === undefined
26983
26999
  && node.findDirectExpression(Expressions.SQLIntoStructure) === undefined) {
26984
- const fields = (_b = node.findFirstExpression(Expressions.SQLAggregation)) === null || _b === void 0 ? void 0 : _b.concatTokens();
27000
+ const fields = (_a = node.findFirstExpression(Expressions.SQLAggregation)) === null || _a === void 0 ? void 0 : _a.concatTokens();
26985
27001
  const c = new RegExp(/^count\(\s*\*\s*\)$/, "i");
26986
27002
  if (fields === undefined || c.test(fields) === false) {
26987
27003
  const nameToken = from === null || from === void 0 ? void 0 : from.findDirectExpression(Expressions.SQLFromSource);
@@ -27015,8 +27031,18 @@ class Select {
27015
27031
  for (const s of node.findAllExpressions(Expressions.SQLCompare)) {
27016
27032
  sql_compare_1.SQLCompare.runSyntax(s, input, dbSources);
27017
27033
  }
27018
- for (const s of node.findDirectExpressions(Expressions.SQLOrderBy)) {
27019
- sql_order_by_1.SQLOrderBy.runSyntax(s, input);
27034
+ const orderBy = node.findDirectExpression(Expressions.SQLOrderBy);
27035
+ if (orderBy) {
27036
+ sql_order_by_1.SQLOrderBy.runSyntax(orderBy, input);
27037
+ const where = node.findDirectExpression(Expressions.SQLCond);
27038
+ if (intoExpression
27039
+ && where
27040
+ && intoExpression.getFirstToken().getStart().isBefore(orderBy.getFirstToken().getStart())
27041
+ && where.getFirstToken().getStart().isBefore(orderBy.getFirstToken().getStart())
27042
+ && where.getFirstToken().getStart().isBefore(intoExpression.getFirstToken().getStart())) {
27043
+ const message = `ORDER BY must be before INTO, after WHERE`;
27044
+ input.issues.push((0, _syntax_input_1.syntaxIssue)(input, orderBy.getFirstToken(), message));
27045
+ }
27020
27046
  }
27021
27047
  if (this.isStrictMode(node)) {
27022
27048
  this.strictModeChecks(node, input);
@@ -27067,13 +27093,14 @@ class Select {
27067
27093
  input.issues.push((0, _syntax_input_1.syntaxIssue)(input, node.getFirstToken(), message));
27068
27094
  }
27069
27095
  }
27070
- static handleInto(node, input, fields, dbSources, _isSingle) {
27096
+ static handleInto(node, input, fields, dbSources) {
27071
27097
  const intoTable = node.findDirectExpression(Expressions.SQLIntoTable);
27072
27098
  if (intoTable) {
27073
27099
  const inline = intoTable.findFirstExpression(Expressions.InlineData);
27074
27100
  if (inline) {
27075
27101
  inline_data_1.InlineData.runSyntax(inline, input, this.buildTableType(fields, dbSources, input.scope));
27076
27102
  }
27103
+ return intoTable;
27077
27104
  }
27078
27105
  const intoStructure = node.findDirectExpression(Expressions.SQLIntoStructure);
27079
27106
  if (intoStructure) {
@@ -27087,6 +27114,7 @@ class Select {
27087
27114
  inline_data_1.InlineData.runSyntax(inline, input, basic_1.VoidType.get("SELECT_todo1"));
27088
27115
  }
27089
27116
  }
27117
+ return intoStructure;
27090
27118
  }
27091
27119
  const intoList = node.findDirectExpression(Expressions.SQLIntoList);
27092
27120
  if (intoList) {
@@ -27126,7 +27154,9 @@ class Select {
27126
27154
  inline_data_1.InlineData.runSyntax(inline, input, type);
27127
27155
  }
27128
27156
  }
27157
+ return intoList;
27129
27158
  }
27159
+ return undefined;
27130
27160
  }
27131
27161
  static checkFields(fields, dbSources, input, node) {
27132
27162
  if (dbSources.length > 1) {
@@ -27843,7 +27873,7 @@ class SQLForAllEntries {
27843
27873
  }
27844
27874
  if (s) {
27845
27875
  const type = source_1.Source.runSyntax(s, input);
27846
- if (type instanceof basic_1.VoidType) {
27876
+ if (type instanceof basic_1.VoidType || type instanceof basic_1.UnknownType) {
27847
27877
  return;
27848
27878
  }
27849
27879
  if (!(type instanceof basic_1.TableType)) {
@@ -28019,7 +28049,9 @@ class StringTemplate {
28019
28049
  input.issues.push((0, _syntax_input_1.syntaxIssue)(input, node.getFirstToken(), message));
28020
28050
  return basic_1.VoidType.get(_syntax_input_1.CheckSyntaxKey);
28021
28051
  }
28022
- else if ((typeUtils.isCharLike(type) === false && typeUtils.isHexLike(type) === false)
28052
+ else if ((typeUtils.isCharLike(type) === false
28053
+ && typeUtils.isHexLike(type) === false
28054
+ && !(type instanceof basic_1.UTCLongType))
28023
28055
  || type instanceof basic_1.StructureType) {
28024
28056
  const message = "String template, not character like, " + type.constructor.name;
28025
28057
  input.issues.push((0, _syntax_input_1.syntaxIssue)(input, node.getFirstToken(), message));
@@ -28198,8 +28230,9 @@ class Target {
28198
28230
  currentIndex++;
28199
28231
  if (current.get() instanceof tokens_1.Dash) {
28200
28232
  if (context instanceof unknown_type_1.UnknownType) {
28201
- const message = "Not a structure, type unknown, target";
28202
- input.issues.push((0, _syntax_input_1.syntaxIssue)(input, node.getFirstToken(), message));
28233
+ return basic_1.VoidType.get(_syntax_input_1.CheckSyntaxKey);
28234
+ }
28235
+ else if (context instanceof basic_1.TableType && context.isWithHeader() && context.getRowType() instanceof unknown_type_1.UnknownType) {
28203
28236
  return basic_1.VoidType.get(_syntax_input_1.CheckSyntaxKey);
28204
28237
  }
28205
28238
  else if (!(context instanceof basic_1.StructureType)
@@ -29106,9 +29139,10 @@ class Append {
29106
29139
  if (source) {
29107
29140
  if (targetType !== undefined
29108
29141
  && !(targetType instanceof basic_1.TableType)
29142
+ && !(targetType instanceof basic_1.UnknownType)
29109
29143
  && dataTarget !== target
29110
29144
  && !(targetType instanceof basic_1.VoidType)) {
29111
- const message = "Append, target not a table type";
29145
+ const message = `Append, target not a table type (${targetType.constructor.name})`;
29112
29146
  input.issues.push((0, _syntax_input_1.syntaxIssue)(input, node.getFirstToken(), message));
29113
29147
  return;
29114
29148
  }
@@ -30194,14 +30228,21 @@ class Convert {
30194
30228
  for (const s of node.findDirectExpressions(Expressions.Source)) {
30195
30229
  source_1.Source.runSyntax(s, input);
30196
30230
  }
30197
- const timeTarget = node.findExpressionAfterToken("TIME");
30198
- if ((timeTarget === null || timeTarget === void 0 ? void 0 : timeTarget.get()) instanceof Expressions.Target) {
30199
- const inline = timeTarget === null || timeTarget === void 0 ? void 0 : timeTarget.findDirectExpression(Expressions.InlineData);
30200
- if (inline) {
30201
- inline_data_1.InlineData.runSyntax(inline, input, new basic_1.TimeType());
30202
- }
30203
- else {
30204
- target_1.Target.runSyntax(timeTarget, input);
30231
+ const timeTargets = node.findExpressionsAfterToken("TIME");
30232
+ for (const timeTarget of timeTargets) {
30233
+ const concat = node.concatTokens().toUpperCase();
30234
+ if ((timeTarget === null || timeTarget === void 0 ? void 0 : timeTarget.get()) instanceof Expressions.Target) {
30235
+ const inline = timeTarget === null || timeTarget === void 0 ? void 0 : timeTarget.findDirectExpression(Expressions.InlineData);
30236
+ if (inline) {
30237
+ let targetType = new basic_1.TimeType();
30238
+ if (concat.includes("DAYLIGHT SAVING TIME " + inline.concatTokens().toUpperCase())) {
30239
+ targetType = new basic_1.CharacterType(1);
30240
+ }
30241
+ inline_data_1.InlineData.runSyntax(inline, input, targetType);
30242
+ }
30243
+ else {
30244
+ target_1.Target.runSyntax(timeTarget, input);
30245
+ }
30205
30246
  }
30206
30247
  }
30207
30248
  const dateTarget = node.findExpressionAfterToken("DATE");
@@ -31519,27 +31560,27 @@ const basic_types_1 = __webpack_require__(/*! ../basic_types */ "./node_modules/
31519
31560
  const _typed_identifier_1 = __webpack_require__(/*! ../../types/_typed_identifier */ "./node_modules/@abaplint/core/build/src/abap/types/_typed_identifier.js");
31520
31561
  const _syntax_input_1 = __webpack_require__(/*! ../_syntax_input */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/_syntax_input.js");
31521
31562
  const assert_error_1 = __webpack_require__(/*! ../assert_error */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/assert_error.js");
31563
+ const _reference_1 = __webpack_require__(/*! ../_reference */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/_reference.js");
31522
31564
  class IncludeType {
31523
31565
  runSyntax(node, input) {
31524
- var _a, _b, _c, _d, _e;
31566
+ var _a, _b;
31525
31567
  const components = [];
31526
31568
  const iname = node.findFirstExpression(Expressions.TypeName);
31527
31569
  if (iname === undefined) {
31528
31570
  throw new assert_error_1.AssertError("IncludeType, unexpected node structure");
31529
31571
  }
31530
- const name = iname.getFirstToken().getStr();
31572
+ const firstToken = iname.getFirstToken();
31573
+ const name = firstToken.getStr();
31531
31574
  const isStructure = node.findDirectTokenByText("STRUCTURE") !== undefined;
31532
31575
  let ityp = new basic_types_1.BasicTypes(input).parseType(iname);
31533
- if (ityp instanceof basic_1.VoidType && isStructure) {
31534
- const found = (_a = input.scope.findVariable(name)) === null || _a === void 0 ? void 0 : _a.getType();
31576
+ if ((ityp instanceof basic_1.VoidType && isStructure) || ityp instanceof basic_1.UnknownType) {
31577
+ const found = input.scope.findVariable(name);
31535
31578
  if (found) {
31536
- ityp = found;
31579
+ input.scope.addReference(firstToken, found, _reference_1.ReferenceType.DataReadReference, input.filename);
31580
+ ityp = found.getType();
31537
31581
  }
31538
31582
  }
31539
- else if (ityp instanceof basic_1.UnknownType) {
31540
- ityp = (_c = (_b = input.scope.findVariable(name)) === null || _b === void 0 ? void 0 : _b.getType()) !== null && _c !== void 0 ? _c : ityp;
31541
- }
31542
- const as = (_d = node.findExpressionAfterToken("AS")) === null || _d === void 0 ? void 0 : _d.concatTokens();
31583
+ const as = (_a = node.findExpressionAfterToken("AS")) === null || _a === void 0 ? void 0 : _a.concatTokens();
31543
31584
  if (as && ityp instanceof basic_1.StructureType) {
31544
31585
  ityp = new basic_1.StructureType(ityp.getComponents().concat([{
31545
31586
  name: as,
@@ -31561,7 +31602,7 @@ class IncludeType {
31561
31602
  input.issues.push((0, _syntax_input_1.syntaxIssue)(input, iname.getFirstToken(), message));
31562
31603
  return basic_1.VoidType.get(_syntax_input_1.CheckSyntaxKey);
31563
31604
  }
31564
- const suffix = (_e = node.findExpressionAfterToken("SUFFIX")) === null || _e === void 0 ? void 0 : _e.concatTokens();
31605
+ const suffix = (_b = node.findExpressionAfterToken("SUFFIX")) === null || _b === void 0 ? void 0 : _b.concatTokens();
31565
31606
  if (suffix && ityp instanceof basic_1.StructureType) {
31566
31607
  const components = [];
31567
31608
  for (const c of ityp.getComponents()) {
@@ -32960,6 +33001,9 @@ class ReadTable {
32960
33001
  input.issues.push((0, _syntax_input_1.syntaxIssue)(input, node.getFirstToken(), message));
32961
33002
  return;
32962
33003
  }
33004
+ else if (sourceType instanceof basic_1.UnknownType) {
33005
+ // do nothing, ok
33006
+ }
32963
33007
  else if (!(sourceType instanceof basic_1.TableType) && !(sourceType instanceof basic_1.VoidType)) {
32964
33008
  const message = "Read table, not a table type";
32965
33009
  input.issues.push((0, _syntax_input_1.syntaxIssue)(input, node.getFirstToken(), message));
@@ -35523,12 +35567,12 @@ class ABAPFile extends _abstract_file_1.AbstractFile {
35523
35567
  getRaw() {
35524
35568
  return this.file.getRaw();
35525
35569
  }
35526
- getInfo() {
35527
- return this.info;
35528
- }
35529
35570
  getRawRows() {
35530
35571
  return this.file.getRawRows();
35531
35572
  }
35573
+ getInfo() {
35574
+ return this.info;
35575
+ }
35532
35576
  getStructure() {
35533
35577
  return this.structure;
35534
35578
  }
@@ -35565,12 +35609,13 @@ exports.ABAPFile = ABAPFile;
35565
35609
 
35566
35610
  Object.defineProperty(exports, "__esModule", ({ value: true }));
35567
35611
  exports.ABAPParser = void 0;
35568
- const version_1 = __webpack_require__(/*! ../version */ "./node_modules/@abaplint/core/build/src/version.js");
35612
+ const abap_file_1 = __webpack_require__(/*! ./abap_file */ "./node_modules/@abaplint/core/build/src/abap/abap_file.js");
35613
+ const abap_file_information_1 = __webpack_require__(/*! ./4_file_information/abap_file_information */ "./node_modules/@abaplint/core/build/src/abap/4_file_information/abap_file_information.js");
35614
+ const abap_file_information_parser_1 = __webpack_require__(/*! ./4_file_information/abap_file_information_parser */ "./node_modules/@abaplint/core/build/src/abap/4_file_information/abap_file_information_parser.js");
35569
35615
  const lexer_1 = __webpack_require__(/*! ./1_lexer/lexer */ "./node_modules/@abaplint/core/build/src/abap/1_lexer/lexer.js");
35570
35616
  const statement_parser_1 = __webpack_require__(/*! ./2_statements/statement_parser */ "./node_modules/@abaplint/core/build/src/abap/2_statements/statement_parser.js");
35571
35617
  const structure_parser_1 = __webpack_require__(/*! ./3_structures/structure_parser */ "./node_modules/@abaplint/core/build/src/abap/3_structures/structure_parser.js");
35572
- const abap_file_information_1 = __webpack_require__(/*! ./4_file_information/abap_file_information */ "./node_modules/@abaplint/core/build/src/abap/4_file_information/abap_file_information.js");
35573
- const abap_file_1 = __webpack_require__(/*! ./abap_file */ "./node_modules/@abaplint/core/build/src/abap/abap_file.js");
35618
+ const version_1 = __webpack_require__(/*! ../version */ "./node_modules/@abaplint/core/build/src/version.js");
35574
35619
  class ABAPParser {
35575
35620
  constructor(version, globalMacros, reg) {
35576
35621
  this.version = version ? version : version_1.defaultVersion;
@@ -35595,7 +35640,9 @@ class ABAPParser {
35595
35640
  for (const f of statementResult) {
35596
35641
  const result = structure_parser_1.StructureParser.run(f);
35597
35642
  // 4: file information
35598
- const info = new abap_file_information_1.ABAPFileInformation(result.node, f.file.getFilename());
35643
+ const parser = new abap_file_information_parser_1.ABAPFileInformationParser(f.file.getFilename());
35644
+ const parsed = parser.parse(result.node);
35645
+ const info = new abap_file_information_1.ABAPFileInformation(parsed);
35599
35646
  output.push(new abap_file_1.ABAPFile(f.file, f.tokens, f.statements, result.node, info));
35600
35647
  issues.push(...result.issues);
35601
35648
  }
@@ -45241,6 +45288,7 @@ class ABAPObject extends _abstract_object_1.AbstractObject {
45241
45288
  setDirty() {
45242
45289
  this.syntaxResult = undefined;
45243
45290
  this.texts = undefined;
45291
+ this.parsed = [];
45244
45292
  super.setDirty();
45245
45293
  }
45246
45294
  getABAPFiles() {
@@ -45335,6 +45383,7 @@ class AbstractObject {
45335
45383
  return this.name;
45336
45384
  }
45337
45385
  setDirty() {
45386
+ this.old = [];
45338
45387
  this.dirty = true;
45339
45388
  }
45340
45389
  addFile(file) {
@@ -47782,6 +47831,37 @@ exports.EcattTestScript = EcattTestScript;
47782
47831
 
47783
47832
  /***/ }),
47784
47833
 
47834
+ /***/ "./node_modules/@abaplint/core/build/src/objects/email_template.js":
47835
+ /*!*************************************************************************!*\
47836
+ !*** ./node_modules/@abaplint/core/build/src/objects/email_template.js ***!
47837
+ \*************************************************************************/
47838
+ /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
47839
+
47840
+ "use strict";
47841
+
47842
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
47843
+ exports.EmailTemplate = void 0;
47844
+ const _abstract_object_1 = __webpack_require__(/*! ./_abstract_object */ "./node_modules/@abaplint/core/build/src/objects/_abstract_object.js");
47845
+ class EmailTemplate extends _abstract_object_1.AbstractObject {
47846
+ getType() {
47847
+ return "SMTG";
47848
+ }
47849
+ getAllowedNaming() {
47850
+ return {
47851
+ maxLength: 60, // todo
47852
+ allowNamespace: true,
47853
+ };
47854
+ }
47855
+ getDescription() {
47856
+ // todo
47857
+ return undefined;
47858
+ }
47859
+ }
47860
+ exports.EmailTemplate = EmailTemplate;
47861
+ //# sourceMappingURL=email_template.js.map
47862
+
47863
+ /***/ }),
47864
+
47785
47865
  /***/ "./node_modules/@abaplint/core/build/src/objects/enhancement_implementation.js":
47786
47866
  /*!*************************************************************************************!*\
47787
47867
  !*** ./node_modules/@abaplint/core/build/src/objects/enhancement_implementation.js ***!
@@ -48215,6 +48295,8 @@ class FunctionGroup extends _abap_object_1.ABAPObject {
48215
48295
  super.setDirty();
48216
48296
  this.includes = undefined;
48217
48297
  this.modules = undefined;
48298
+ this.description = undefined;
48299
+ this.dynpros = undefined;
48218
48300
  }
48219
48301
  getAllowedNaming() {
48220
48302
  return {
@@ -49071,7 +49153,6 @@ __exportStar(__webpack_require__(/*! ./behavior_definition */ "./node_modules/@a
49071
49153
  __exportStar(__webpack_require__(/*! ./brf_plus_system_application */ "./node_modules/@abaplint/core/build/src/objects/brf_plus_system_application.js"), exports);
49072
49154
  __exportStar(__webpack_require__(/*! ./bsp_application */ "./node_modules/@abaplint/core/build/src/objects/bsp_application.js"), exports);
49073
49155
  __exportStar(__webpack_require__(/*! ./business_add_in_implementation */ "./node_modules/@abaplint/core/build/src/objects/business_add_in_implementation.js"), exports);
49074
- __exportStar(__webpack_require__(/*! ./cds_entity_buffer */ "./node_modules/@abaplint/core/build/src/objects/cds_entity_buffer.js"), exports);
49075
49156
  __exportStar(__webpack_require__(/*! ./business_catalog_app_assignment */ "./node_modules/@abaplint/core/build/src/objects/business_catalog_app_assignment.js"), exports);
49076
49157
  __exportStar(__webpack_require__(/*! ./business_catalog */ "./node_modules/@abaplint/core/build/src/objects/business_catalog.js"), exports);
49077
49158
  __exportStar(__webpack_require__(/*! ./business_configuration_maintenance_object */ "./node_modules/@abaplint/core/build/src/objects/business_configuration_maintenance_object.js"), exports);
@@ -49080,6 +49161,7 @@ __exportStar(__webpack_require__(/*! ./business_function_assignment */ "./node_m
49080
49161
  __exportStar(__webpack_require__(/*! ./business_function_set_assignment */ "./node_modules/@abaplint/core/build/src/objects/business_function_set_assignment.js"), exports);
49081
49162
  __exportStar(__webpack_require__(/*! ./business_object_model */ "./node_modules/@abaplint/core/build/src/objects/business_object_model.js"), exports);
49082
49163
  __exportStar(__webpack_require__(/*! ./business_object_type */ "./node_modules/@abaplint/core/build/src/objects/business_object_type.js"), exports);
49164
+ __exportStar(__webpack_require__(/*! ./cds_entity_buffer */ "./node_modules/@abaplint/core/build/src/objects/cds_entity_buffer.js"), exports);
49083
49165
  __exportStar(__webpack_require__(/*! ./cds_metadata_extension */ "./node_modules/@abaplint/core/build/src/objects/cds_metadata_extension.js"), exports);
49084
49166
  __exportStar(__webpack_require__(/*! ./cds_type */ "./node_modules/@abaplint/core/build/src/objects/cds_type.js"), exports);
49085
49167
  __exportStar(__webpack_require__(/*! ./change_document */ "./node_modules/@abaplint/core/build/src/objects/change_document.js"), exports);
@@ -49105,6 +49187,7 @@ __exportStar(__webpack_require__(/*! ./domain */ "./node_modules/@abaplint/core/
49105
49187
  __exportStar(__webpack_require__(/*! ./ecatt_test_configuration */ "./node_modules/@abaplint/core/build/src/objects/ecatt_test_configuration.js"), exports);
49106
49188
  __exportStar(__webpack_require__(/*! ./ecatt_test_data_container */ "./node_modules/@abaplint/core/build/src/objects/ecatt_test_data_container.js"), exports);
49107
49189
  __exportStar(__webpack_require__(/*! ./ecatt_test_script */ "./node_modules/@abaplint/core/build/src/objects/ecatt_test_script.js"), exports);
49190
+ __exportStar(__webpack_require__(/*! ./email_template */ "./node_modules/@abaplint/core/build/src/objects/email_template.js"), exports);
49108
49191
  __exportStar(__webpack_require__(/*! ./enhancement_implementation */ "./node_modules/@abaplint/core/build/src/objects/enhancement_implementation.js"), exports);
49109
49192
  __exportStar(__webpack_require__(/*! ./enhancement_spot */ "./node_modules/@abaplint/core/build/src/objects/enhancement_spot.js"), exports);
49110
49193
  __exportStar(__webpack_require__(/*! ./entity_type */ "./node_modules/@abaplint/core/build/src/objects/entity_type.js"), exports);
@@ -49420,6 +49503,7 @@ class LockObject extends _abstract_object_1.AbstractObject {
49420
49503
  getAllowedNaming() {
49421
49504
  return {
49422
49505
  maxLength: 16,
49506
+ customRegex: /^(\/[A-Z_\d]{3,8}\/)?E[A-Z0-9_]+$/i,
49423
49507
  allowNamespace: true,
49424
49508
  };
49425
49509
  }
@@ -52160,6 +52244,13 @@ class Table extends _abstract_object_1.AbstractObject {
52160
52244
  }
52161
52245
  return (_a = this.parsedData) === null || _a === void 0 ? void 0 : _a.description;
52162
52246
  }
52247
+ getSecondaryIndexes() {
52248
+ var _a;
52249
+ if (this.parsedData === undefined) {
52250
+ this.parseXML();
52251
+ }
52252
+ return (_a = this.parsedData) === null || _a === void 0 ? void 0 : _a.secondaryIndexes;
52253
+ }
52163
52254
  getAllowedNaming() {
52164
52255
  let length = 30;
52165
52256
  const regex = /^((\/[A-Z_\d]{3,8}\/)|[a-zA-Z0-9]{3}|CI_)\w+$/;
@@ -52387,7 +52478,7 @@ class Table extends _abstract_object_1.AbstractObject {
52387
52478
  }
52388
52479
  ///////////////
52389
52480
  parseXML() {
52390
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
52481
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
52391
52482
  const parsed = super.parseRaw2();
52392
52483
  if (parsed === undefined) {
52393
52484
  return;
@@ -52426,6 +52517,25 @@ class Table extends _abstract_object_1.AbstractObject {
52426
52517
  DDTEXT: field.DDTEXT,
52427
52518
  });
52428
52519
  }
52520
+ // secondary indexes
52521
+ const indexes = (_m = parsed.abapGit["asx:abap"]["asx:values"]) === null || _m === void 0 ? void 0 : _m.DD12V;
52522
+ ;
52523
+ this.parsedData.secondaryIndexes = [];
52524
+ for (const index of (0, xml_utils_1.xmlToArray)(indexes === null || indexes === void 0 ? void 0 : indexes.DD12V)) {
52525
+ const indexName = index.INDEXNAME;
52526
+ const indexFields = [];
52527
+ const indexFieldsXml = (_o = parsed.abapGit["asx:abap"]["asx:values"]) === null || _o === void 0 ? void 0 : _o.DD17V;
52528
+ for (const indexField of (0, xml_utils_1.xmlToArray)(indexFieldsXml === null || indexFieldsXml === void 0 ? void 0 : indexFieldsXml.DD17V)) {
52529
+ if (indexField.INDEXNAME === indexName) {
52530
+ // assumption: fields are listed by POSITION in the xml
52531
+ indexFields.push(indexField.FIELDNAME);
52532
+ }
52533
+ }
52534
+ this.parsedData.secondaryIndexes.push({
52535
+ name: indexName,
52536
+ fields: indexFields,
52537
+ });
52538
+ }
52429
52539
  }
52430
52540
  }
52431
52541
  exports.Table = Table;
@@ -53783,7 +53893,7 @@ class Registry {
53783
53893
  }
53784
53894
  static abaplintVersion() {
53785
53895
  // magic, see build script "version.sh"
53786
- return "2.113.241";
53896
+ return "2.114.4";
53787
53897
  }
53788
53898
  getDDICReferences() {
53789
53899
  return this.ddicReferences;
@@ -55244,14 +55354,14 @@ class AllowedObjectNaming {
55244
55354
  const name = obj.getName();
55245
55355
  let message = "";
55246
55356
  if (name.length > allowed.maxLength) {
55247
- message = "Name exceeds max length";
55357
+ message = "Name exceeds max length, allowed is " + allowed.maxLength;
55248
55358
  }
55249
55359
  else if (allowed.allowNamespace === false && name.indexOf("/") >= 0) {
55250
55360
  message = "Namespace not allowed for object type";
55251
55361
  }
55252
55362
  else if (allowed.customRegex !== undefined) {
55253
55363
  if (name.match(allowed.customRegex) === null) {
55254
- message = "Name not allowed";
55364
+ message = "Name not allowed, expected to match " + allowed.customRegex.toString();
55255
55365
  }
55256
55366
  }
55257
55367
  else if (name.match(NAME_REGEX) === null) {
@@ -55856,7 +55966,7 @@ ENDTRY.`,
55856
55966
  for (const statNode of file.getStatements()) {
55857
55967
  const statement = statNode.get();
55858
55968
  if (statement instanceof Statements.CallTransaction && !statNode.concatTokensWithoutStringsAndComments().toUpperCase().includes("WITH AUTHORITY-CHECK")) {
55859
- issues.push(issue_1.Issue.atStatement(file, statNode, this.getMessage(), this.getMetadata().key));
55969
+ issues.push(issue_1.Issue.atStatement(file, statNode, this.getMessage(), this.getMetadata().key, this.getConfig().severity));
55860
55970
  }
55861
55971
  }
55862
55972
  return issues;
@@ -56037,7 +56147,7 @@ class CDSParserError {
56037
56147
  title: "CDS Parser Error",
56038
56148
  shortDescription: `CDS parsing`,
56039
56149
  extendedInformation: `Parses CDS and issues parser errors`,
56040
- tags: [_irule_1.RuleTag.Syntax],
56150
+ tags: [_irule_1.RuleTag.Syntax, _irule_1.RuleTag.SingleFile],
56041
56151
  };
56042
56152
  }
56043
56153
  getConfig() {
@@ -56696,6 +56806,10 @@ const _irule_1 = __webpack_require__(/*! ./_irule */ "./node_modules/@abaplint/c
56696
56806
  const objects_1 = __webpack_require__(/*! ../objects */ "./node_modules/@abaplint/core/build/src/objects/index.js");
56697
56807
  const severity_1 = __webpack_require__(/*! ../severity */ "./node_modules/@abaplint/core/build/src/severity.js");
56698
56808
  class CheckIncludeConf extends _basic_rule_config_1.BasicRuleConfig {
56809
+ constructor() {
56810
+ super(...arguments);
56811
+ this.allowUnused = false;
56812
+ }
56699
56813
  }
56700
56814
  exports.CheckIncludeConf = CheckIncludeConf;
56701
56815
  class CheckInclude {
@@ -56723,7 +56837,7 @@ class CheckInclude {
56723
56837
  }
56724
56838
  initialize(reg) {
56725
56839
  this.reg = reg;
56726
- this.graph = new include_graph_1.IncludeGraph(this.reg, this.getConfig().severity || severity_1.Severity.Error);
56840
+ this.graph = new include_graph_1.IncludeGraph(this.reg, this.getConfig().severity || severity_1.Severity.Error, this.getConfig().allowUnused || false);
56727
56841
  return this;
56728
56842
  }
56729
56843
  run(obj) {
@@ -64689,8 +64803,7 @@ https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abapstart-of-selectio
64689
64803
  tags: [_irule_1.RuleTag.SingleFile],
64690
64804
  badExample: `REPORT zfoo.
64691
64805
  WRITE 'hello'.`,
64692
- goodExample: `
64693
- START-OF-SELECTION.
64806
+ goodExample: `START-OF-SELECTION.
64694
64807
  WRITE 'hello'.`,
64695
64808
  };
64696
64809
  }
@@ -65143,6 +65256,7 @@ __exportStar(__webpack_require__(/*! ./implement_methods */ "./node_modules/@aba
65143
65256
  __exportStar(__webpack_require__(/*! ./implicit_start_of_selection */ "./node_modules/@abaplint/core/build/src/rules/implicit_start_of_selection.js"), exports);
65144
65257
  __exportStar(__webpack_require__(/*! ./in_statement_indentation */ "./node_modules/@abaplint/core/build/src/rules/in_statement_indentation.js"), exports);
65145
65258
  __exportStar(__webpack_require__(/*! ./indentation */ "./node_modules/@abaplint/core/build/src/rules/indentation.js"), exports);
65259
+ __exportStar(__webpack_require__(/*! ./index_completely_contained */ "./node_modules/@abaplint/core/build/src/rules/index_completely_contained.js"), exports);
65146
65260
  __exportStar(__webpack_require__(/*! ./inline_data_old_versions */ "./node_modules/@abaplint/core/build/src/rules/inline_data_old_versions.js"), exports);
65147
65261
  __exportStar(__webpack_require__(/*! ./intf_referencing_clas */ "./node_modules/@abaplint/core/build/src/rules/intf_referencing_clas.js"), exports);
65148
65262
  __exportStar(__webpack_require__(/*! ./invalid_table_index */ "./node_modules/@abaplint/core/build/src/rules/invalid_table_index.js"), exports);
@@ -65249,6 +65363,83 @@ __exportStar(__webpack_require__(/*! ./xml_consistency */ "./node_modules/@abapl
65249
65363
 
65250
65364
  /***/ }),
65251
65365
 
65366
+ /***/ "./node_modules/@abaplint/core/build/src/rules/index_completely_contained.js":
65367
+ /*!***********************************************************************************!*\
65368
+ !*** ./node_modules/@abaplint/core/build/src/rules/index_completely_contained.js ***!
65369
+ \***********************************************************************************/
65370
+ /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
65371
+
65372
+ "use strict";
65373
+
65374
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
65375
+ exports.IndexCompletelyContained = exports.IndexCompletelyContainedConf = void 0;
65376
+ const _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ "./node_modules/@abaplint/core/build/src/rules/_basic_rule_config.js");
65377
+ const _irule_1 = __webpack_require__(/*! ./_irule */ "./node_modules/@abaplint/core/build/src/rules/_irule.js");
65378
+ const issue_1 = __webpack_require__(/*! ../issue */ "./node_modules/@abaplint/core/build/src/issue.js");
65379
+ const position_1 = __webpack_require__(/*! ../position */ "./node_modules/@abaplint/core/build/src/position.js");
65380
+ const Objects = __webpack_require__(/*! ../objects */ "./node_modules/@abaplint/core/build/src/objects/index.js");
65381
+ class IndexCompletelyContainedConf extends _basic_rule_config_1.BasicRuleConfig {
65382
+ }
65383
+ exports.IndexCompletelyContainedConf = IndexCompletelyContainedConf;
65384
+ class IndexCompletelyContained {
65385
+ constructor() {
65386
+ this.conf = new IndexCompletelyContainedConf();
65387
+ }
65388
+ getMetadata() {
65389
+ return {
65390
+ key: "index_completely_contained",
65391
+ title: "Check if database table indexes are completely contained",
65392
+ shortDescription: `If indexes are completely contained in other indexes, they can be removed to improve performance.`,
65393
+ tags: [_irule_1.RuleTag.Performance, _irule_1.RuleTag.SingleFile],
65394
+ };
65395
+ }
65396
+ initialize() {
65397
+ return this;
65398
+ }
65399
+ getConfig() {
65400
+ return this.conf;
65401
+ }
65402
+ setConfig(conf) {
65403
+ this.conf = conf;
65404
+ }
65405
+ run(obj) {
65406
+ if (!(obj instanceof Objects.Table)) {
65407
+ return [];
65408
+ }
65409
+ const indexes = obj.getSecondaryIndexes();
65410
+ if (indexes === undefined || indexes.length === 0) {
65411
+ return [];
65412
+ }
65413
+ const issues = [];
65414
+ for (let i = 0; i < indexes.length; i++) {
65415
+ const indexA = indexes[i];
65416
+ for (let j = 0; j < indexes.length; j++) {
65417
+ if (i === j) {
65418
+ continue;
65419
+ }
65420
+ const indexB = indexes[j];
65421
+ let contained = true;
65422
+ for (const field of indexA.fields) {
65423
+ if (indexB.fields.indexOf(field) === -1) {
65424
+ contained = false;
65425
+ break;
65426
+ }
65427
+ }
65428
+ if (contained) {
65429
+ const position = new position_1.Position(1, 1);
65430
+ const message = `Index "${indexA.name}" is completely contained in index "${indexB.name}"`;
65431
+ issues.push(issue_1.Issue.atPosition(obj.getFiles()[0], position, message, this.getMetadata().key, this.conf.severity));
65432
+ }
65433
+ }
65434
+ }
65435
+ return issues;
65436
+ }
65437
+ }
65438
+ exports.IndexCompletelyContained = IndexCompletelyContained;
65439
+ //# sourceMappingURL=index_completely_contained.js.map
65440
+
65441
+ /***/ }),
65442
+
65252
65443
  /***/ "./node_modules/@abaplint/core/build/src/rules/inline_data_old_versions.js":
65253
65444
  /*!*********************************************************************************!*\
65254
65445
  !*** ./node_modules/@abaplint/core/build/src/rules/inline_data_old_versions.js ***!
@@ -77421,11 +77612,12 @@ class Graph {
77421
77612
  }
77422
77613
  }
77423
77614
  class IncludeGraph {
77424
- constructor(reg, severity = severity_1.Severity.Error) {
77615
+ constructor(reg, severity = severity_1.Severity.Error, allowUnused = false) {
77425
77616
  this.reg = reg;
77426
77617
  this.issues = [];
77427
77618
  this.graph = new Graph();
77428
77619
  this.severity = severity;
77620
+ this.allowUnused = allowUnused;
77429
77621
  this.build();
77430
77622
  }
77431
77623
  listMainForInclude(filename) {
@@ -77449,6 +77641,7 @@ class IncludeGraph {
77449
77641
  }
77450
77642
  const v = this.graph.findVertexByFilename(file.getFilename());
77451
77643
  if (v !== undefined
77644
+ && this.allowUnused === false
77452
77645
  && v.include === true
77453
77646
  && this.listMainForInclude(v.filename).length === 0) {
77454
77647
  const f = this.reg.getFileByName(v.filename);
@@ -78784,13 +78977,13 @@ class CompareTranspiler {
78784
78977
  const field = concat.replace(" IS NOT REQUESTED", "").toLowerCase();
78785
78978
  return new chunk_1.Chunk().appendString(pre + "INPUT && INPUT." + field + " === undefined && INPUT.importing?." + field + " === undefined");
78786
78979
  }
78787
- if (concat.startsWith("NOT ") || concat.includes(" IS NOT INSTANCE OF ")) {
78788
- const cname = node.findDirectExpression(core_1.Expressions.ClassName)?.concatTokens();
78789
- return new chunk_1.Chunk().appendString("abap.compare.instance_of(").appendChunk(s0).appendString(`, ${cname}) === false`);
78790
- }
78791
- else if (concat.includes(" IS INSTANCE OF ")) {
78792
- const cname = node.findDirectExpression(core_1.Expressions.ClassName)?.concatTokens();
78793
- return new chunk_1.Chunk().appendString("abap.compare.instance_of(").appendChunk(s0).appendString(`, ${cname})`);
78980
+ if (concat.includes(" IS INSTANCE OF ")) {
78981
+ const notted = concat.startsWith("NOT ") || concat.includes(" IS NOT INSTANCE OF ");
78982
+ const falsed = notted ? " === false" : "";
78983
+ const expr = node.findDirectExpression(core_1.Expressions.ClassName);
78984
+ const cname = expr?.concatTokens();
78985
+ const lookup = traversal.lookupClassOrInterface(cname, expr?.getFirstToken());
78986
+ return new chunk_1.Chunk().appendString("abap.compare.instance_of(").appendChunk(s0).appendString(`, ${lookup})` + falsed);
78794
78987
  }
78795
78988
  }
78796
78989
  else if (sources.length === 2 && node.findDirectTokenByText("IN")) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/transpiler-cli",
3
- "version": "2.12.11",
3
+ "version": "2.12.13",
4
4
  "description": "Transpiler - Command Line Interface",
5
5
  "funding": "https://github.com/sponsors/larshp",
6
6
  "bin": {
@@ -27,8 +27,8 @@
27
27
  "author": "abaplint",
28
28
  "license": "MIT",
29
29
  "devDependencies": {
30
- "@abaplint/core": "^2.113.241",
31
- "@abaplint/transpiler": "^2.12.11",
30
+ "@abaplint/core": "^2.114.4",
31
+ "@abaplint/transpiler": "^2.12.13",
32
32
  "@types/glob": "^8.1.0",
33
33
  "@types/node": "^24.10.1",
34
34
  "@types/progress": "^2.0.7",