@abaplint/transpiler-cli 2.7.20 → 2.7.22

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 +162 -53
  2. package/package.json +5 -5
package/build/bundle.js CHANGED
@@ -16163,8 +16163,8 @@ class StructureParser {
16163
16163
  return { issues: [], node: parent };
16164
16164
  }
16165
16165
  }
16166
- StructureParser.singletons = {};
16167
16166
  exports.StructureParser = StructureParser;
16167
+ StructureParser.singletons = {};
16168
16168
  //# sourceMappingURL=structure_parser.js.map
16169
16169
 
16170
16170
  /***/ }),
@@ -17802,26 +17802,26 @@ var AttributeLevel;
17802
17802
  AttributeLevel["Instance"] = "instance";
17803
17803
  AttributeLevel["Static"] = "static";
17804
17804
  AttributeLevel["Constant"] = "constant";
17805
- })(AttributeLevel = exports.AttributeLevel || (exports.AttributeLevel = {}));
17805
+ })(AttributeLevel || (exports.AttributeLevel = AttributeLevel = {}));
17806
17806
  var MethodParameterDirection;
17807
17807
  (function (MethodParameterDirection) {
17808
17808
  MethodParameterDirection["Importing"] = "importing";
17809
17809
  MethodParameterDirection["Exporting"] = "exporting";
17810
17810
  MethodParameterDirection["Changing"] = "changing";
17811
17811
  MethodParameterDirection["Returning"] = "returning";
17812
- })(MethodParameterDirection = exports.MethodParameterDirection || (exports.MethodParameterDirection = {}));
17812
+ })(MethodParameterDirection || (exports.MethodParameterDirection = MethodParameterDirection = {}));
17813
17813
  var Duration;
17814
17814
  (function (Duration) {
17815
17815
  Duration["short"] = "SHORT";
17816
17816
  Duration["medium"] = "MEDIUM";
17817
17817
  Duration["long"] = "LONG";
17818
- })(Duration = exports.Duration || (exports.Duration = {}));
17818
+ })(Duration || (exports.Duration = Duration = {}));
17819
17819
  var RiskLevel;
17820
17820
  (function (RiskLevel) {
17821
17821
  RiskLevel["harmless"] = "HARMLESS";
17822
17822
  RiskLevel["critical"] = "CRITICAL";
17823
17823
  RiskLevel["dangerous"] = "DANGEROUS";
17824
- })(RiskLevel = exports.RiskLevel || (exports.RiskLevel = {}));
17824
+ })(RiskLevel || (exports.RiskLevel = RiskLevel = {}));
17825
17825
  //# sourceMappingURL=_abap_file_information.js.map
17826
17826
 
17827
17827
  /***/ }),
@@ -18272,7 +18272,7 @@ var Visibility;
18272
18272
  Visibility[Visibility["Private"] = 1] = "Private";
18273
18273
  Visibility[Visibility["Protected"] = 2] = "Protected";
18274
18274
  Visibility[Visibility["Public"] = 3] = "Public";
18275
- })(Visibility = exports.Visibility || (exports.Visibility = {}));
18275
+ })(Visibility || (exports.Visibility = Visibility = {}));
18276
18276
  //# sourceMappingURL=visibility.js.map
18277
18277
 
18278
18278
  /***/ }),
@@ -18640,6 +18640,7 @@ class BuiltIn {
18640
18640
  return new _typed_identifier_1.TypedIdentifier(id, BuiltIn.filename, new basic_1.VoidType(name), ["built-in" /* IdentifierMeta.BuiltIn */]);
18641
18641
  }
18642
18642
  }
18643
+ exports.BuiltIn = BuiltIn;
18643
18644
  BuiltIn.filename = "_builtin.prog.abap";
18644
18645
  // todo: "pcre" vs "regex", only one of these parameters are allowed
18645
18646
  // todo: "pcre", only possible from 755
@@ -19463,7 +19464,6 @@ BuiltIn.methods = [
19463
19464
  return: new basic_1.IntegerType(),
19464
19465
  },
19465
19466
  ];
19466
- exports.BuiltIn = BuiltIn;
19467
19467
  //# sourceMappingURL=_builtin.js.map
19468
19468
 
19469
19469
  /***/ }),
@@ -20422,7 +20422,7 @@ var ReferenceType;
20422
20422
  // FormVoidReference = "Form (void)",
20423
20423
  ReferenceType["DataReadReference"] = "Read From";
20424
20424
  ReferenceType["DataWriteReference"] = "Write To";
20425
- })(ReferenceType = exports.ReferenceType || (exports.ReferenceType = {}));
20425
+ })(ReferenceType || (exports.ReferenceType = ReferenceType = {}));
20426
20426
  //# sourceMappingURL=_reference.js.map
20427
20427
 
20428
20428
  /***/ }),
@@ -20455,7 +20455,7 @@ var ScopeType;
20455
20455
  ScopeType["For"] = "for";
20456
20456
  ScopeType["Let"] = "let";
20457
20457
  ScopeType["OpenSQL"] = "open_sql";
20458
- })(ScopeType = exports.ScopeType || (exports.ScopeType = {}));
20458
+ })(ScopeType || (exports.ScopeType = ScopeType = {}));
20459
20459
  //# sourceMappingURL=_scope_type.js.map
20460
20460
 
20461
20461
  /***/ }),
@@ -20528,6 +20528,7 @@ class TypeUtils {
20528
20528
  || type instanceof basic_1.UnknownType
20529
20529
  || type instanceof basic_1.NumericType
20530
20530
  || type instanceof basic_1.IntegerType
20531
+ || type instanceof basic_1.Integer8Type
20531
20532
  || type instanceof basic_1.SimpleType
20532
20533
  || type instanceof basic_1.FloatType
20533
20534
  || type instanceof basic_1.FloatingPointType
@@ -20735,6 +20736,11 @@ class TypeUtils {
20735
20736
  }
20736
20737
  return true;
20737
20738
  }
20739
+ else if (source instanceof basic_1.Integer8Type) {
20740
+ if (target instanceof basic_1.IntegerType || target instanceof basic_1.StringType) {
20741
+ return false;
20742
+ }
20743
+ }
20738
20744
  return this.isAssignable(source, target);
20739
20745
  }
20740
20746
  isAssignable(source, target) {
@@ -25658,6 +25664,15 @@ class SpaghettiScopeNode extends ScopeData {
25658
25664
  }
25659
25665
  return undefined;
25660
25666
  }
25667
+ listClassDefinitions() {
25668
+ let search = this;
25669
+ const ret = [];
25670
+ while (search !== undefined) {
25671
+ ret.push(...Object.values(search.getData().cdefs));
25672
+ search = search.getParent();
25673
+ }
25674
+ return ret;
25675
+ }
25661
25676
  findFormDefinition(name) {
25662
25677
  let search = this;
25663
25678
  const upper = name.toUpperCase();
@@ -33752,6 +33767,7 @@ __exportStar(__webpack_require__(/*! ./floating_point_type */ "./node_modules/@a
33752
33767
  __exportStar(__webpack_require__(/*! ./generic_object_reference_type */ "./node_modules/@abaplint/core/build/src/abap/types/basic/generic_object_reference_type.js"), exports);
33753
33768
  __exportStar(__webpack_require__(/*! ./hex_type */ "./node_modules/@abaplint/core/build/src/abap/types/basic/hex_type.js"), exports);
33754
33769
  __exportStar(__webpack_require__(/*! ./integer_type */ "./node_modules/@abaplint/core/build/src/abap/types/basic/integer_type.js"), exports);
33770
+ __exportStar(__webpack_require__(/*! ./integer8_type */ "./node_modules/@abaplint/core/build/src/abap/types/basic/integer8_type.js"), exports);
33755
33771
  __exportStar(__webpack_require__(/*! ./numeric_generic_type */ "./node_modules/@abaplint/core/build/src/abap/types/basic/numeric_generic_type.js"), exports);
33756
33772
  __exportStar(__webpack_require__(/*! ./numeric_type */ "./node_modules/@abaplint/core/build/src/abap/types/basic/numeric_type.js"), exports);
33757
33773
  __exportStar(__webpack_require__(/*! ./object_reference_type */ "./node_modules/@abaplint/core/build/src/abap/types/basic/object_reference_type.js"), exports);
@@ -33770,6 +33786,39 @@ __exportStar(__webpack_require__(/*! ./xstring_type */ "./node_modules/@abaplint
33770
33786
 
33771
33787
  /***/ }),
33772
33788
 
33789
+ /***/ "./node_modules/@abaplint/core/build/src/abap/types/basic/integer8_type.js":
33790
+ /*!*********************************************************************************!*\
33791
+ !*** ./node_modules/@abaplint/core/build/src/abap/types/basic/integer8_type.js ***!
33792
+ \*********************************************************************************/
33793
+ /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
33794
+
33795
+ "use strict";
33796
+
33797
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
33798
+ exports.Integer8Type = void 0;
33799
+ const _abstract_type_1 = __webpack_require__(/*! ./_abstract_type */ "./node_modules/@abaplint/core/build/src/abap/types/basic/_abstract_type.js");
33800
+ class Integer8Type extends _abstract_type_1.AbstractType {
33801
+ toText() {
33802
+ return "```int8```";
33803
+ }
33804
+ isGeneric() {
33805
+ return false;
33806
+ }
33807
+ toABAP() {
33808
+ return "int8";
33809
+ }
33810
+ containsVoid() {
33811
+ return false;
33812
+ }
33813
+ toCDS() {
33814
+ return "abap.int8";
33815
+ }
33816
+ }
33817
+ exports.Integer8Type = Integer8Type;
33818
+ //# sourceMappingURL=integer8_type.js.map
33819
+
33820
+ /***/ }),
33821
+
33773
33822
  /***/ "./node_modules/@abaplint/core/build/src/abap/types/basic/integer_type.js":
33774
33823
  /*!********************************************************************************!*\
33775
33824
  !*** ./node_modules/@abaplint/core/build/src/abap/types/basic/integer_type.js ***!
@@ -34123,13 +34172,13 @@ var TableAccessType;
34123
34172
  TableAccessType["hashed"] = "HASHED";
34124
34173
  TableAccessType["index"] = "INDEX";
34125
34174
  TableAccessType["any"] = "ANY";
34126
- })(TableAccessType = exports.TableAccessType || (exports.TableAccessType = {}));
34175
+ })(TableAccessType || (exports.TableAccessType = TableAccessType = {}));
34127
34176
  var TableKeyType;
34128
34177
  (function (TableKeyType) {
34129
34178
  TableKeyType["default"] = "DEFAULT";
34130
34179
  TableKeyType["user"] = "USER";
34131
34180
  TableKeyType["empty"] = "EMPTY";
34132
- })(TableKeyType = exports.TableKeyType || (exports.TableKeyType = {}));
34181
+ })(TableKeyType || (exports.TableKeyType = TableKeyType = {}));
34133
34182
  class TableType extends _abstract_type_1.AbstractType {
34134
34183
  constructor(rowType, options, qualifiedName) {
34135
34184
  var _a;
@@ -35027,7 +35076,7 @@ var FunctionModuleParameterDirection;
35027
35076
  FunctionModuleParameterDirection["exporting"] = "exporting";
35028
35077
  FunctionModuleParameterDirection["changing"] = "changing";
35029
35078
  FunctionModuleParameterDirection["tables"] = "tables";
35030
- })(FunctionModuleParameterDirection = exports.FunctionModuleParameterDirection || (exports.FunctionModuleParameterDirection = {}));
35079
+ })(FunctionModuleParameterDirection || (exports.FunctionModuleParameterDirection = FunctionModuleParameterDirection = {}));
35031
35080
  class FunctionModuleDefinition {
35032
35081
  constructor(data) {
35033
35082
  this.parse(data);
@@ -37229,8 +37278,9 @@ class DDIC {
37229
37278
  case "CSEQUENCE":
37230
37279
  return new Types.CSequenceType({ qualifiedName: qualifiedName });
37231
37280
  case "I":
37232
- case "INT8": // todo, take version into account
37233
37281
  return new Types.IntegerType({ qualifiedName: qualifiedName || name });
37282
+ case "INT8": // todo, take version into account
37283
+ return new Types.Integer8Type({ qualifiedName: qualifiedName || name });
37234
37284
  case "F":
37235
37285
  return new Types.FloatType({ qualifiedName: qualifiedName || name });
37236
37286
  case "P":
@@ -37710,7 +37760,7 @@ var DDLKind;
37710
37760
  (function (DDLKind) {
37711
37761
  DDLKind["Structure"] = "structure";
37712
37762
  DDLKind["Table"] = "table";
37713
- })(DDLKind = exports.DDLKind || (exports.DDLKind = {}));
37763
+ })(DDLKind || (exports.DDLKind = DDLKind = {}));
37714
37764
  class DDLParser {
37715
37765
  parse(file) {
37716
37766
  const tokens = ddl_lexer_1.DDLLexer.run(file);
@@ -38633,6 +38683,7 @@ const _scope_type_1 = __webpack_require__(/*! ../abap/5_syntax/_scope_type */ ".
38633
38683
  const types_1 = __webpack_require__(/*! ../abap/types */ "./node_modules/@abaplint/core/build/src/abap/types/index.js");
38634
38684
  class LSPLookup {
38635
38685
  static lookup(cursor, reg, obj) {
38686
+ var _a, _b;
38636
38687
  const inc = this.findInclude(cursor, reg);
38637
38688
  if (inc) {
38638
38689
  const found = this.ABAPFileResult(inc);
@@ -38702,6 +38753,22 @@ class LSPLookup {
38702
38753
  }
38703
38754
  return { hover: hoverValue, definition: location, implementation: location, definitionId: variable, scope: bottomScope };
38704
38755
  }
38756
+ for (const c of bottomScope.listClassDefinitions()) {
38757
+ for (const m of ((_a = c.getMethodDefinitions()) === null || _a === void 0 ? void 0 : _a.getAll()) || []) {
38758
+ for (const p of ((_b = m.getParameters()) === null || _b === void 0 ? void 0 : _b.getAll()) || []) {
38759
+ if (p.getStart().equals(cursor.token.getStart())) {
38760
+ const found = _lsp_utils_1.LSPUtils.identiferToLocation(p);
38761
+ return {
38762
+ hover: "Method Parameter, " + cursor.token.getStr(),
38763
+ definition: found,
38764
+ definitionId: p,
38765
+ implementation: undefined,
38766
+ scope: bottomScope,
38767
+ };
38768
+ }
38769
+ }
38770
+ }
38771
+ }
38705
38772
  const refs = this.searchReferences(bottomScope, cursor.token);
38706
38773
  if (refs.length > 0) {
38707
38774
  for (const ref of refs) {
@@ -40109,12 +40176,14 @@ const _typed_identifier_1 = __webpack_require__(/*! ../abap/types/_typed_identif
40109
40176
  const types_1 = __webpack_require__(/*! ../abap/types */ "./node_modules/@abaplint/core/build/src/abap/types/index.js");
40110
40177
  const references_1 = __webpack_require__(/*! ./references */ "./node_modules/@abaplint/core/build/src/lsp/references.js");
40111
40178
  const renamer_1 = __webpack_require__(/*! ../objects/rename/renamer */ "./node_modules/@abaplint/core/build/src/objects/rename/renamer.js");
40179
+ const definition_1 = __webpack_require__(/*! ./definition */ "./node_modules/@abaplint/core/build/src/lsp/definition.js");
40112
40180
  var RenameType;
40113
40181
  (function (RenameType) {
40114
40182
  RenameType[RenameType["GlobalClass"] = 1] = "GlobalClass";
40115
40183
  RenameType[RenameType["Variable"] = 2] = "Variable";
40116
40184
  RenameType[RenameType["GlobalInterface"] = 3] = "GlobalInterface";
40117
- })(RenameType = exports.RenameType || (exports.RenameType = {}));
40185
+ RenameType[RenameType["Method"] = 4] = "Method";
40186
+ })(RenameType || (exports.RenameType = RenameType = {}));
40118
40187
  class Rename {
40119
40188
  constructor(reg) {
40120
40189
  this.reg = reg;
@@ -40133,15 +40202,23 @@ class Rename {
40133
40202
  return undefined;
40134
40203
  }
40135
40204
  const range = _lsp_utils_1.LSPUtils.tokenToRange(cursor.token);
40205
+ let placeholder = cursor.token.getStr();
40206
+ if (placeholder.startsWith("!")) {
40207
+ placeholder = placeholder.substring(1);
40208
+ range.start.character += 1;
40209
+ }
40136
40210
  const lookup = _lookup_1.LSPLookup.lookup(cursor, this.reg, obj);
40137
40211
  if ((lookup === null || lookup === void 0 ? void 0 : lookup.definitionId) instanceof _typed_identifier_1.TypedIdentifier) {
40138
- return { range, placeholder: cursor.token.getStr(), type: RenameType.Variable, file };
40212
+ return { range, placeholder, type: RenameType.Variable, file };
40139
40213
  }
40140
40214
  else if ((lookup === null || lookup === void 0 ? void 0 : lookup.definitionId) instanceof types_1.ClassDefinition) {
40141
- return { range, placeholder: cursor.token.getStr(), type: RenameType.GlobalClass, file };
40215
+ return { range, placeholder, type: RenameType.GlobalClass, file };
40142
40216
  }
40143
40217
  else if ((lookup === null || lookup === void 0 ? void 0 : lookup.definitionId) instanceof types_1.InterfaceDefinition) {
40144
- return { range, placeholder: cursor.token.getStr(), type: RenameType.GlobalInterface, file };
40218
+ return { range, placeholder, type: RenameType.GlobalInterface, file };
40219
+ }
40220
+ else if ((lookup === null || lookup === void 0 ? void 0 : lookup.definitionId) instanceof types_1.MethodDefinition) {
40221
+ return { range, placeholder, type: RenameType.Method, file };
40145
40222
  }
40146
40223
  return undefined;
40147
40224
  }
@@ -40157,6 +40234,8 @@ class Rename {
40157
40234
  return new renamer_1.Renamer(this.reg).buildEdits("INTF", prepare.placeholder, params.newName);
40158
40235
  case RenameType.Variable:
40159
40236
  return this.renameVariable(params);
40237
+ case RenameType.Method:
40238
+ return this.renameMethod(params);
40160
40239
  default:
40161
40240
  return undefined;
40162
40241
  }
@@ -40173,6 +40252,23 @@ class Rename {
40173
40252
  }
40174
40253
  return workspace;
40175
40254
  }
40255
+ renameMethod(params) {
40256
+ var _a, _b;
40257
+ const workspace = { documentChanges: [] };
40258
+ const refs = new references_1.References(this.reg).references(params);
40259
+ for (const r of refs) {
40260
+ const doc = { uri: r.uri, version: 1 };
40261
+ const edit = LServer.TextDocumentEdit.create(doc, [LServer.TextEdit.replace(r.range, params.newName)]);
40262
+ (_a = workspace.documentChanges) === null || _a === void 0 ? void 0 : _a.push(edit);
40263
+ }
40264
+ const def = new definition_1.Definition(this.reg).find(params.textDocument, params.position);
40265
+ if (def) {
40266
+ const doc = { uri: params.textDocument.uri, version: 1 };
40267
+ const edit = LServer.TextDocumentEdit.create(doc, [LServer.TextEdit.replace(def === null || def === void 0 ? void 0 : def.range, params.newName)]);
40268
+ (_b = workspace.documentChanges) === null || _b === void 0 ? void 0 : _b.push(edit);
40269
+ }
40270
+ return workspace;
40271
+ }
40176
40272
  }
40177
40273
  exports.Rename = Rename;
40178
40274
  //# sourceMappingURL=rename.js.map
@@ -40315,8 +40411,8 @@ class SemanticHighlighting {
40315
40411
  return ret;
40316
40412
  }
40317
40413
  }
40318
- SemanticHighlighting.tokenTypes = [];
40319
40414
  exports.SemanticHighlighting = SemanticHighlighting;
40415
+ SemanticHighlighting.tokenTypes = [];
40320
40416
  //# sourceMappingURL=semantic.js.map
40321
40417
 
40322
40418
  /***/ }),
@@ -41584,7 +41680,7 @@ var ClassCategory;
41584
41680
  ClassCategory["PersistentFactory"] = "11";
41585
41681
  ClassCategory["Exception"] = "40";
41586
41682
  ClassCategory["SharedObject"] = "45";
41587
- })(ClassCategory = exports.ClassCategory || (exports.ClassCategory = {}));
41683
+ })(ClassCategory || (exports.ClassCategory = ClassCategory = {}));
41588
41684
  class Class extends _abap_object_1.ABAPObject {
41589
41685
  constructor() {
41590
41686
  super(...arguments);
@@ -45644,7 +45740,7 @@ var EnhancementCategory;
45644
45740
  EnhancementCategory["Character"] = "2";
45645
45741
  EnhancementCategory["CharacterOrNumeric"] = "3";
45646
45742
  EnhancementCategory["Deep"] = "4";
45647
- })(EnhancementCategory = exports.EnhancementCategory || (exports.EnhancementCategory = {}));
45743
+ })(EnhancementCategory || (exports.EnhancementCategory = EnhancementCategory = {}));
45648
45744
  var TableCategory;
45649
45745
  (function (TableCategory) {
45650
45746
  TableCategory["Transparent"] = "TRANSP";
@@ -45653,7 +45749,7 @@ var TableCategory;
45653
45749
  TableCategory["Pooled"] = "POOL";
45654
45750
  TableCategory["View"] = "VIEW";
45655
45751
  TableCategory["Append"] = "APPEND";
45656
- })(TableCategory = exports.TableCategory || (exports.TableCategory = {}));
45752
+ })(TableCategory || (exports.TableCategory = TableCategory = {}));
45657
45753
  class Table extends _abstract_object_1.AbstractObject {
45658
45754
  getType() {
45659
45755
  return "TABL";
@@ -47119,7 +47215,7 @@ class Registry {
47119
47215
  }
47120
47216
  static abaplintVersion() {
47121
47217
  // magic, see build script "version.sh"
47122
- return "2.101.8";
47218
+ return "2.101.11";
47123
47219
  }
47124
47220
  getDDICReferences() {
47125
47221
  return this.ddicReferences;
@@ -47571,7 +47667,7 @@ var RuleTag;
47571
47667
  RuleTag["Styleguide"] = "Styleguide";
47572
47668
  /** Single file compatible, the rule gives correct results when having only information about the single file */
47573
47669
  RuleTag["SingleFile"] = "SingleFile";
47574
- })(RuleTag = exports.RuleTag || (exports.RuleTag = {}));
47670
+ })(RuleTag || (exports.RuleTag = RuleTag = {}));
47575
47671
  //# sourceMappingURL=_irule.js.map
47576
47672
 
47577
47673
  /***/ }),
@@ -54370,9 +54466,16 @@ ${indentation} output = ${topTarget}.`;
54370
54466
  const data = `DATA ${name} TYPE REF TO ${type}.\n` +
54371
54467
  indentation + abap + "\n" +
54372
54468
  indentation;
54373
- const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, high.getFirstToken().getStart(), data);
54374
- const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, found.getFirstToken().getStart(), found.getLastToken().getEnd(), name);
54375
- fix = edit_helper_1.EditHelper.merge(fix2, fix1);
54469
+ if (found.getFirstToken().getStart().equals(high.getFirstToken().getStart())
54470
+ && found.getLastToken().getEnd().equals(high.getLastToken().getStart())) {
54471
+ // full statement = standalone NEW expression
54472
+ fix = edit_helper_1.EditHelper.replaceRange(lowFile, high.getFirstToken().getStart(), high.getLastToken().getEnd(), abap);
54473
+ }
54474
+ else {
54475
+ const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, high.getFirstToken().getStart(), data);
54476
+ const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, found.getFirstToken().getStart(), found.getLastToken().getEnd(), name);
54477
+ fix = edit_helper_1.EditHelper.merge(fix2, fix1);
54478
+ }
54376
54479
  }
54377
54480
  if (fix) {
54378
54481
  return issue_1.Issue.atToken(lowFile, high.getFirstToken(), "Use CREATE OBJECT instead of NEW", this.getMetadata().key, this.conf.severity, fix);
@@ -54738,24 +54841,24 @@ class EmptyStructure extends _abap_rule_1.ABAPRule {
54738
54841
  }
54739
54842
  const candidates = [];
54740
54843
  if (this.getConfig().loop === true) {
54741
- candidates.push(...stru.findAllStructures(Structures.Loop));
54844
+ candidates.push(...stru.findAllStructuresRecursive(Structures.Loop));
54742
54845
  }
54743
54846
  if (this.getConfig().while === true) {
54744
- candidates.push(...stru.findAllStructures(Structures.While));
54847
+ candidates.push(...stru.findAllStructuresRecursive(Structures.While));
54745
54848
  }
54746
54849
  if (this.getConfig().case === true) {
54747
- candidates.push(...stru.findAllStructures(Structures.Case));
54850
+ candidates.push(...stru.findAllStructuresRecursive(Structures.Case));
54748
54851
  }
54749
54852
  if (this.getConfig().select === true) {
54750
- candidates.push(...stru.findAllStructures(Structures.Select));
54853
+ candidates.push(...stru.findAllStructuresRecursive(Structures.Select));
54751
54854
  }
54752
54855
  if (this.getConfig().do === true) {
54753
- candidates.push(...stru.findAllStructures(Structures.Do));
54856
+ candidates.push(...stru.findAllStructuresRecursive(Structures.Do));
54754
54857
  }
54755
54858
  if (this.getConfig().at === true) {
54756
- candidates.push(...stru.findAllStructures(Structures.At));
54757
- candidates.push(...stru.findAllStructures(Structures.AtFirst));
54758
- candidates.push(...stru.findAllStructures(Structures.AtLast));
54859
+ candidates.push(...stru.findAllStructuresRecursive(Structures.At));
54860
+ candidates.push(...stru.findAllStructuresRecursive(Structures.AtFirst));
54861
+ candidates.push(...stru.findAllStructuresRecursive(Structures.AtLast));
54759
54862
  }
54760
54863
  for (const l of candidates) {
54761
54864
  if (l.getChildren().length === 2) {
@@ -54765,7 +54868,7 @@ class EmptyStructure extends _abap_rule_1.ABAPRule {
54765
54868
  }
54766
54869
  }
54767
54870
  if (this.getConfig().try === true) {
54768
- const tries = stru.findAllStructures(Structures.Try);
54871
+ const tries = stru.findAllStructuresRecursive(Structures.Try);
54769
54872
  for (const t of tries) {
54770
54873
  const normal = t.findDirectStructure(Structures.Body);
54771
54874
  if (normal === undefined) {
@@ -54776,9 +54879,9 @@ class EmptyStructure extends _abap_rule_1.ABAPRule {
54776
54879
  }
54777
54880
  }
54778
54881
  if (this.getConfig().if === true) {
54779
- const tries = stru.findAllStructures(Structures.If)
54780
- .concat(stru.findAllStructures(Structures.Else))
54781
- .concat(stru.findAllStructures(Structures.ElseIf));
54882
+ const tries = stru.findAllStructuresRecursive(Structures.If)
54883
+ .concat(stru.findAllStructuresRecursive(Structures.Else))
54884
+ .concat(stru.findAllStructuresRecursive(Structures.ElseIf));
54782
54885
  for (const t of tries) {
54783
54886
  const normal = t.findDirectStructure(Structures.Body);
54784
54887
  if (normal === undefined) {
@@ -54789,7 +54892,7 @@ class EmptyStructure extends _abap_rule_1.ABAPRule {
54789
54892
  }
54790
54893
  }
54791
54894
  if (this.getConfig().when === true) {
54792
- const tries = stru.findAllStructures(Structures.When);
54895
+ const tries = stru.findAllStructuresRecursive(Structures.When);
54793
54896
  for (const t of tries) {
54794
54897
  if (t.getChildren().length === 1) {
54795
54898
  const token = t.getFirstToken();
@@ -57609,7 +57712,7 @@ var KeywordCaseStyle;
57609
57712
  (function (KeywordCaseStyle) {
57610
57713
  KeywordCaseStyle["Upper"] = "upper";
57611
57714
  KeywordCaseStyle["Lower"] = "lower";
57612
- })(KeywordCaseStyle = exports.KeywordCaseStyle || (exports.KeywordCaseStyle = {}));
57715
+ })(KeywordCaseStyle || (exports.KeywordCaseStyle = KeywordCaseStyle = {}));
57613
57716
  class KeywordCaseConf extends _basic_rule_config_1.BasicRuleConfig {
57614
57717
  constructor() {
57615
57718
  super(...arguments);
@@ -59856,7 +59959,7 @@ var NewlineLogic;
59856
59959
  (function (NewlineLogic) {
59857
59960
  NewlineLogic["Exact"] = "exact";
59858
59961
  NewlineLogic["Less"] = "less";
59859
- })(NewlineLogic = exports.NewlineLogic || (exports.NewlineLogic = {}));
59962
+ })(NewlineLogic || (exports.NewlineLogic = NewlineLogic = {}));
59860
59963
  class NewlineBetweenMethodsConf extends _basic_rule_config_1.BasicRuleConfig {
59861
59964
  constructor() {
59862
59965
  super(...arguments);
@@ -67610,7 +67713,7 @@ var Severity;
67610
67713
  Severity["Error"] = "Error";
67611
67714
  Severity["Warning"] = "Warning";
67612
67715
  Severity["Info"] = "Info";
67613
- })(Severity = exports.Severity || (exports.Severity = {}));
67716
+ })(Severity || (exports.Severity = Severity = {}));
67614
67717
  //# sourceMappingURL=severity.js.map
67615
67718
 
67616
67719
  /***/ }),
@@ -68259,7 +68362,7 @@ var Version;
68259
68362
  Version["v756"] = "v756";
68260
68363
  Version["v757"] = "v757";
68261
68364
  Version["Cloud"] = "Cloud";
68262
- })(Version = exports.Version || (exports.Version = {}));
68365
+ })(Version || (exports.Version = Version = {}));
68263
68366
  exports.defaultVersion = Version.v757;
68264
68367
  function getPreviousVersion(v) {
68265
68368
  if (v === Version.OpenABAP) {
@@ -78968,7 +79071,7 @@ class TranspileTypes {
78968
79071
  return pre + t.getName().toLowerCase() + " = " + code + ";\n";
78969
79072
  }
78970
79073
  toType(type) {
78971
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
79074
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
78972
79075
  let resolved = "";
78973
79076
  let extra = "";
78974
79077
  if (type instanceof abaplint.BasicTypes.ObjectReferenceType
@@ -78992,28 +79095,34 @@ class TranspileTypes {
78992
79095
  extra = "{qualifiedName: \"" + ((_c = type.getQualifiedName()) === null || _c === void 0 ? void 0 : _c.toUpperCase()) + "\"}";
78993
79096
  }
78994
79097
  }
79098
+ else if (type instanceof abaplint.BasicTypes.Integer8Type) {
79099
+ resolved = "Integer8";
79100
+ if (type.getQualifiedName() !== undefined) {
79101
+ extra = "{qualifiedName: \"" + ((_d = type.getQualifiedName()) === null || _d === void 0 ? void 0 : _d.toUpperCase()) + "\"}";
79102
+ }
79103
+ }
78995
79104
  else if (type instanceof abaplint.BasicTypes.StringType) {
78996
79105
  resolved = "String";
78997
79106
  if (type.getQualifiedName() !== undefined) {
78998
- extra = "{qualifiedName: \"" + ((_d = type.getQualifiedName()) === null || _d === void 0 ? void 0 : _d.toUpperCase()) + "\"}";
79107
+ extra = "{qualifiedName: \"" + ((_e = type.getQualifiedName()) === null || _e === void 0 ? void 0 : _e.toUpperCase()) + "\"}";
78999
79108
  }
79000
79109
  }
79001
79110
  else if (type instanceof abaplint.BasicTypes.UTCLongType) {
79002
79111
  resolved = "UTCLong";
79003
79112
  if (type.getQualifiedName() !== undefined) {
79004
- extra = "{qualifiedName: \"" + ((_e = type.getQualifiedName()) === null || _e === void 0 ? void 0 : _e.toUpperCase()) + "\"}";
79113
+ extra = "{qualifiedName: \"" + ((_f = type.getQualifiedName()) === null || _f === void 0 ? void 0 : _f.toUpperCase()) + "\"}";
79005
79114
  }
79006
79115
  }
79007
79116
  else if (type instanceof abaplint.BasicTypes.DateType) {
79008
79117
  resolved = "Date";
79009
79118
  if (type.getQualifiedName() !== undefined) {
79010
- extra = "{qualifiedName: \"" + ((_f = type.getQualifiedName()) === null || _f === void 0 ? void 0 : _f.toUpperCase()) + "\"}";
79119
+ extra = "{qualifiedName: \"" + ((_g = type.getQualifiedName()) === null || _g === void 0 ? void 0 : _g.toUpperCase()) + "\"}";
79011
79120
  }
79012
79121
  }
79013
79122
  else if (type instanceof abaplint.BasicTypes.TimeType) {
79014
79123
  resolved = "Time";
79015
79124
  if (type.getQualifiedName() !== undefined) {
79016
- extra = "{qualifiedName: \"" + ((_g = type.getQualifiedName()) === null || _g === void 0 ? void 0 : _g.toUpperCase()) + "\"}";
79125
+ extra = "{qualifiedName: \"" + ((_h = type.getQualifiedName()) === null || _h === void 0 ? void 0 : _h.toUpperCase()) + "\"}";
79017
79126
  }
79018
79127
  }
79019
79128
  else if (type instanceof abaplint.BasicTypes.DataReference) {
@@ -79084,7 +79193,7 @@ class TranspileTypes {
79084
79193
  else if (type instanceof abaplint.BasicTypes.XStringType) {
79085
79194
  resolved = "XString";
79086
79195
  if (type.getQualifiedName() !== undefined) {
79087
- extra = "{qualifiedName: \"" + ((_h = type.getQualifiedName()) === null || _h === void 0 ? void 0 : _h.toUpperCase()) + "\"}";
79196
+ extra = "{qualifiedName: \"" + ((_j = type.getQualifiedName()) === null || _j === void 0 ? void 0 : _j.toUpperCase()) + "\"}";
79088
79197
  }
79089
79198
  }
79090
79199
  else if (type instanceof abaplint.BasicTypes.XSequenceType) {
@@ -79100,13 +79209,13 @@ class TranspileTypes {
79100
79209
  else if (type instanceof abaplint.BasicTypes.FloatType) {
79101
79210
  resolved = "Float";
79102
79211
  if (type.getQualifiedName() !== undefined) {
79103
- extra = "{qualifiedName: \"" + ((_j = type.getQualifiedName()) === null || _j === void 0 ? void 0 : _j.toUpperCase()) + "\"}";
79212
+ extra = "{qualifiedName: \"" + ((_k = type.getQualifiedName()) === null || _k === void 0 ? void 0 : _k.toUpperCase()) + "\"}";
79104
79213
  }
79105
79214
  }
79106
79215
  else if (type instanceof abaplint.BasicTypes.FloatingPointType) {
79107
79216
  resolved = "Float";
79108
79217
  if (type.getQualifiedName() !== undefined) {
79109
- extra = "{qualifiedName: \"" + ((_k = type.getQualifiedName()) === null || _k === void 0 ? void 0 : _k.toUpperCase()) + "\"}";
79218
+ extra = "{qualifiedName: \"" + ((_l = type.getQualifiedName()) === null || _l === void 0 ? void 0 : _l.toUpperCase()) + "\"}";
79110
79219
  }
79111
79220
  }
79112
79221
  else if (type instanceof abaplint.BasicTypes.DecFloat34Type) {
@@ -79797,9 +79906,9 @@ class UniqueIdentifier {
79797
79906
  return "indexBackup1";
79798
79907
  }
79799
79908
  }
79909
+ exports.UniqueIdentifier = UniqueIdentifier;
79800
79910
  UniqueIdentifier.counter = 0;
79801
79911
  UniqueIdentifier.indexBackup = 0;
79802
- exports.UniqueIdentifier = UniqueIdentifier;
79803
79912
  //# sourceMappingURL=unique_identifier.js.map
79804
79913
 
79805
79914
  /***/ }),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/transpiler-cli",
3
- "version": "2.7.20",
3
+ "version": "2.7.22",
4
4
  "description": "Transpiler - Command Line Interface",
5
5
  "funding": "https://github.com/sponsors/larshp",
6
6
  "bin": {
@@ -26,15 +26,15 @@
26
26
  "author": "abaplint",
27
27
  "license": "MIT",
28
28
  "devDependencies": {
29
- "@abaplint/transpiler": "^2.7.20",
29
+ "@abaplint/transpiler": "^2.7.22",
30
30
  "@types/glob": "^7.2.0",
31
31
  "glob": "=7.2.0",
32
32
  "@types/progress": "^2.0.5",
33
33
  "@types/node": "^20.2.5",
34
- "@abaplint/core": "^2.101.8",
34
+ "@abaplint/core": "^2.101.11",
35
35
  "progress": "^2.0.3",
36
- "webpack": "^5.84.1",
36
+ "webpack": "^5.85.0",
37
37
  "webpack-cli": "^5.1.1",
38
- "typescript": "^5.0.4"
38
+ "typescript": "^5.1.3"
39
39
  }
40
40
  }