@abaplint/core 2.101.8 → 2.101.10

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.
@@ -423,6 +423,7 @@ declare namespace BasicTypes {
423
423
  GenericObjectReferenceType,
424
424
  HexType,
425
425
  IntegerType,
426
+ Integer8Type,
426
427
  NumericGenericType,
427
428
  NumericType,
428
429
  ObjectReferenceType,
@@ -3332,6 +3333,14 @@ declare class Integer extends Expression {
3332
3333
  getRunnable(): IStatementRunnable;
3333
3334
  }
3334
3335
 
3336
+ declare class Integer8Type extends AbstractType {
3337
+ toText(): string;
3338
+ isGeneric(): boolean;
3339
+ toABAP(): string;
3340
+ containsVoid(): boolean;
3341
+ toCDS(): string;
3342
+ }
3343
+
3335
3344
  declare class IntegerType extends AbstractType {
3336
3345
  toText(): string;
3337
3346
  isGeneric(): boolean;
@@ -3628,6 +3637,7 @@ export declare interface ISpaghettiScopeNode {
3628
3637
  end: Position;
3629
3638
  };
3630
3639
  findClassDefinition(name: string): IClassDefinition | undefined;
3640
+ listClassDefinitions(): IClassDefinition[];
3631
3641
  findFormDefinition(name: string): IFormDefinition | undefined;
3632
3642
  listFormDefinitions(): IFormDefinition[];
3633
3643
  findInterfaceDefinition(name: string): IInterfaceDefinition | undefined;
@@ -5285,6 +5295,7 @@ export declare class SpaghettiScopeNode extends ScopeData implements ISpaghettiS
5285
5295
  setEnd(end: Position): void;
5286
5296
  findDeferred(name: string): Identifier | undefined;
5287
5297
  findClassDefinition(name: string): IClassDefinition | undefined;
5298
+ listClassDefinitions(): IClassDefinition[];
5288
5299
  findFormDefinition(name: string): IFormDefinition | undefined;
5289
5300
  listFormDefinitions(): IFormDefinition[];
5290
5301
  findInterfaceDefinition(name: string): IInterfaceDefinition | undefined;
@@ -53,6 +53,6 @@ class StructureParser {
53
53
  return { issues: [], node: parent };
54
54
  }
55
55
  }
56
- StructureParser.singletons = {};
57
56
  exports.StructureParser = StructureParser;
57
+ StructureParser.singletons = {};
58
58
  //# sourceMappingURL=structure_parser.js.map
@@ -7,24 +7,24 @@ var AttributeLevel;
7
7
  AttributeLevel["Instance"] = "instance";
8
8
  AttributeLevel["Static"] = "static";
9
9
  AttributeLevel["Constant"] = "constant";
10
- })(AttributeLevel = exports.AttributeLevel || (exports.AttributeLevel = {}));
10
+ })(AttributeLevel || (exports.AttributeLevel = AttributeLevel = {}));
11
11
  var MethodParameterDirection;
12
12
  (function (MethodParameterDirection) {
13
13
  MethodParameterDirection["Importing"] = "importing";
14
14
  MethodParameterDirection["Exporting"] = "exporting";
15
15
  MethodParameterDirection["Changing"] = "changing";
16
16
  MethodParameterDirection["Returning"] = "returning";
17
- })(MethodParameterDirection = exports.MethodParameterDirection || (exports.MethodParameterDirection = {}));
17
+ })(MethodParameterDirection || (exports.MethodParameterDirection = MethodParameterDirection = {}));
18
18
  var Duration;
19
19
  (function (Duration) {
20
20
  Duration["short"] = "SHORT";
21
21
  Duration["medium"] = "MEDIUM";
22
22
  Duration["long"] = "LONG";
23
- })(Duration = exports.Duration || (exports.Duration = {}));
23
+ })(Duration || (exports.Duration = Duration = {}));
24
24
  var RiskLevel;
25
25
  (function (RiskLevel) {
26
26
  RiskLevel["harmless"] = "HARMLESS";
27
27
  RiskLevel["critical"] = "CRITICAL";
28
28
  RiskLevel["dangerous"] = "DANGEROUS";
29
- })(RiskLevel = exports.RiskLevel || (exports.RiskLevel = {}));
29
+ })(RiskLevel || (exports.RiskLevel = RiskLevel = {}));
30
30
  //# sourceMappingURL=_abap_file_information.js.map
@@ -6,5 +6,5 @@ var Visibility;
6
6
  Visibility[Visibility["Private"] = 1] = "Private";
7
7
  Visibility[Visibility["Protected"] = 2] = "Protected";
8
8
  Visibility[Visibility["Public"] = 3] = "Public";
9
- })(Visibility = exports.Visibility || (exports.Visibility = {}));
9
+ })(Visibility || (exports.Visibility = Visibility = {}));
10
10
  //# sourceMappingURL=visibility.js.map
@@ -354,6 +354,7 @@ class BuiltIn {
354
354
  return new _typed_identifier_1.TypedIdentifier(id, BuiltIn.filename, new basic_1.VoidType(name), ["built-in" /* IdentifierMeta.BuiltIn */]);
355
355
  }
356
356
  }
357
+ exports.BuiltIn = BuiltIn;
357
358
  BuiltIn.filename = "_builtin.prog.abap";
358
359
  // todo: "pcre" vs "regex", only one of these parameters are allowed
359
360
  // todo: "pcre", only possible from 755
@@ -1177,5 +1178,4 @@ BuiltIn.methods = [
1177
1178
  return: new basic_1.IntegerType(),
1178
1179
  },
1179
1180
  ];
1180
- exports.BuiltIn = BuiltIn;
1181
1181
  //# sourceMappingURL=_builtin.js.map
@@ -20,5 +20,5 @@ var ReferenceType;
20
20
  // FormVoidReference = "Form (void)",
21
21
  ReferenceType["DataReadReference"] = "Read From";
22
22
  ReferenceType["DataWriteReference"] = "Write To";
23
- })(ReferenceType = exports.ReferenceType || (exports.ReferenceType = {}));
23
+ })(ReferenceType || (exports.ReferenceType = ReferenceType = {}));
24
24
  //# sourceMappingURL=_reference.js.map
@@ -19,5 +19,5 @@ var ScopeType;
19
19
  ScopeType["For"] = "for";
20
20
  ScopeType["Let"] = "let";
21
21
  ScopeType["OpenSQL"] = "open_sql";
22
- })(ScopeType = exports.ScopeType || (exports.ScopeType = {}));
22
+ })(ScopeType || (exports.ScopeType = ScopeType = {}));
23
23
  //# sourceMappingURL=_scope_type.js.map
@@ -266,6 +266,11 @@ class TypeUtils {
266
266
  }
267
267
  return true;
268
268
  }
269
+ else if (source instanceof basic_1.Integer8Type) {
270
+ if (target instanceof basic_1.IntegerType || target instanceof basic_1.StringType) {
271
+ return false;
272
+ }
273
+ }
269
274
  return this.isAssignable(source, target);
270
275
  }
271
276
  isAssignable(source, target) {
@@ -77,6 +77,15 @@ class SpaghettiScopeNode extends ScopeData {
77
77
  }
78
78
  return undefined;
79
79
  }
80
+ listClassDefinitions() {
81
+ let search = this;
82
+ const ret = [];
83
+ while (search !== undefined) {
84
+ ret.push(...Object.values(search.getData().cdefs));
85
+ search = search.getParent();
86
+ }
87
+ return ret;
88
+ }
80
89
  findFormDefinition(name) {
81
90
  let search = this;
82
91
  const upper = name.toUpperCase();
@@ -29,6 +29,7 @@ __exportStar(require("./floating_point_type"), exports);
29
29
  __exportStar(require("./generic_object_reference_type"), exports);
30
30
  __exportStar(require("./hex_type"), exports);
31
31
  __exportStar(require("./integer_type"), exports);
32
+ __exportStar(require("./integer8_type"), exports);
32
33
  __exportStar(require("./numeric_generic_type"), exports);
33
34
  __exportStar(require("./numeric_type"), exports);
34
35
  __exportStar(require("./object_reference_type"), exports);
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Integer8Type = void 0;
4
+ const _abstract_type_1 = require("./_abstract_type");
5
+ class Integer8Type extends _abstract_type_1.AbstractType {
6
+ toText() {
7
+ return "```int8```";
8
+ }
9
+ isGeneric() {
10
+ return false;
11
+ }
12
+ toABAP() {
13
+ return "int8";
14
+ }
15
+ containsVoid() {
16
+ return false;
17
+ }
18
+ toCDS() {
19
+ return "abap.int8";
20
+ }
21
+ }
22
+ exports.Integer8Type = Integer8Type;
23
+ //# sourceMappingURL=integer8_type.js.map
@@ -9,13 +9,13 @@ var TableAccessType;
9
9
  TableAccessType["hashed"] = "HASHED";
10
10
  TableAccessType["index"] = "INDEX";
11
11
  TableAccessType["any"] = "ANY";
12
- })(TableAccessType = exports.TableAccessType || (exports.TableAccessType = {}));
12
+ })(TableAccessType || (exports.TableAccessType = TableAccessType = {}));
13
13
  var TableKeyType;
14
14
  (function (TableKeyType) {
15
15
  TableKeyType["default"] = "DEFAULT";
16
16
  TableKeyType["user"] = "USER";
17
17
  TableKeyType["empty"] = "EMPTY";
18
- })(TableKeyType = exports.TableKeyType || (exports.TableKeyType = {}));
18
+ })(TableKeyType || (exports.TableKeyType = TableKeyType = {}));
19
19
  class TableType extends _abstract_type_1.AbstractType {
20
20
  constructor(rowType, options, qualifiedName) {
21
21
  var _a;
@@ -8,7 +8,7 @@ var FunctionModuleParameterDirection;
8
8
  FunctionModuleParameterDirection["exporting"] = "exporting";
9
9
  FunctionModuleParameterDirection["changing"] = "changing";
10
10
  FunctionModuleParameterDirection["tables"] = "tables";
11
- })(FunctionModuleParameterDirection = exports.FunctionModuleParameterDirection || (exports.FunctionModuleParameterDirection = {}));
11
+ })(FunctionModuleParameterDirection || (exports.FunctionModuleParameterDirection = FunctionModuleParameterDirection = {}));
12
12
  class FunctionModuleDefinition {
13
13
  constructor(data) {
14
14
  this.parse(data);
package/build/src/ddic.js CHANGED
@@ -80,8 +80,9 @@ class DDIC {
80
80
  case "CSEQUENCE":
81
81
  return new Types.CSequenceType({ qualifiedName: qualifiedName });
82
82
  case "I":
83
- case "INT8": // todo, take version into account
84
83
  return new Types.IntegerType({ qualifiedName: qualifiedName || name });
84
+ case "INT8": // todo, take version into account
85
+ return new Types.Integer8Type({ qualifiedName: qualifiedName || name });
85
86
  case "F":
86
87
  return new Types.FloatType({ qualifiedName: qualifiedName || name });
87
88
  case "P":
@@ -10,7 +10,7 @@ var DDLKind;
10
10
  (function (DDLKind) {
11
11
  DDLKind["Structure"] = "structure";
12
12
  DDLKind["Table"] = "table";
13
- })(DDLKind = exports.DDLKind || (exports.DDLKind = {}));
13
+ })(DDLKind || (exports.DDLKind = DDLKind = {}));
14
14
  class DDLParser {
15
15
  parse(file) {
16
16
  const tokens = ddl_lexer_1.DDLLexer.run(file);
@@ -13,6 +13,7 @@ const _scope_type_1 = require("../abap/5_syntax/_scope_type");
13
13
  const types_1 = require("../abap/types");
14
14
  class LSPLookup {
15
15
  static lookup(cursor, reg, obj) {
16
+ var _a, _b;
16
17
  const inc = this.findInclude(cursor, reg);
17
18
  if (inc) {
18
19
  const found = this.ABAPFileResult(inc);
@@ -82,6 +83,22 @@ class LSPLookup {
82
83
  }
83
84
  return { hover: hoverValue, definition: location, implementation: location, definitionId: variable, scope: bottomScope };
84
85
  }
86
+ for (const c of bottomScope.listClassDefinitions()) {
87
+ for (const m of ((_a = c.getMethodDefinitions()) === null || _a === void 0 ? void 0 : _a.getAll()) || []) {
88
+ for (const p of ((_b = m.getParameters()) === null || _b === void 0 ? void 0 : _b.getAll()) || []) {
89
+ if (p.getStart().equals(cursor.token.getStart())) {
90
+ const found = _lsp_utils_1.LSPUtils.identiferToLocation(p);
91
+ return {
92
+ hover: "Method Parameter, " + cursor.token.getStr(),
93
+ definition: found,
94
+ definitionId: p,
95
+ implementation: undefined,
96
+ scope: bottomScope,
97
+ };
98
+ }
99
+ }
100
+ }
101
+ }
85
102
  const refs = this.searchReferences(bottomScope, cursor.token);
86
103
  if (refs.length > 0) {
87
104
  for (const ref of refs) {
@@ -9,12 +9,14 @@ const _typed_identifier_1 = require("../abap/types/_typed_identifier");
9
9
  const types_1 = require("../abap/types");
10
10
  const references_1 = require("./references");
11
11
  const renamer_1 = require("../objects/rename/renamer");
12
+ const definition_1 = require("./definition");
12
13
  var RenameType;
13
14
  (function (RenameType) {
14
15
  RenameType[RenameType["GlobalClass"] = 1] = "GlobalClass";
15
16
  RenameType[RenameType["Variable"] = 2] = "Variable";
16
17
  RenameType[RenameType["GlobalInterface"] = 3] = "GlobalInterface";
17
- })(RenameType = exports.RenameType || (exports.RenameType = {}));
18
+ RenameType[RenameType["Method"] = 4] = "Method";
19
+ })(RenameType || (exports.RenameType = RenameType = {}));
18
20
  class Rename {
19
21
  constructor(reg) {
20
22
  this.reg = reg;
@@ -33,15 +35,23 @@ class Rename {
33
35
  return undefined;
34
36
  }
35
37
  const range = _lsp_utils_1.LSPUtils.tokenToRange(cursor.token);
38
+ let placeholder = cursor.token.getStr();
39
+ if (placeholder.startsWith("!")) {
40
+ placeholder = placeholder.substring(1);
41
+ range.start.character += 1;
42
+ }
36
43
  const lookup = _lookup_1.LSPLookup.lookup(cursor, this.reg, obj);
37
44
  if ((lookup === null || lookup === void 0 ? void 0 : lookup.definitionId) instanceof _typed_identifier_1.TypedIdentifier) {
38
- return { range, placeholder: cursor.token.getStr(), type: RenameType.Variable, file };
45
+ return { range, placeholder, type: RenameType.Variable, file };
39
46
  }
40
47
  else if ((lookup === null || lookup === void 0 ? void 0 : lookup.definitionId) instanceof types_1.ClassDefinition) {
41
- return { range, placeholder: cursor.token.getStr(), type: RenameType.GlobalClass, file };
48
+ return { range, placeholder, type: RenameType.GlobalClass, file };
42
49
  }
43
50
  else if ((lookup === null || lookup === void 0 ? void 0 : lookup.definitionId) instanceof types_1.InterfaceDefinition) {
44
- return { range, placeholder: cursor.token.getStr(), type: RenameType.GlobalInterface, file };
51
+ return { range, placeholder, type: RenameType.GlobalInterface, file };
52
+ }
53
+ else if ((lookup === null || lookup === void 0 ? void 0 : lookup.definitionId) instanceof types_1.MethodDefinition) {
54
+ return { range, placeholder, type: RenameType.Method, file };
45
55
  }
46
56
  return undefined;
47
57
  }
@@ -57,6 +67,8 @@ class Rename {
57
67
  return new renamer_1.Renamer(this.reg).buildEdits("INTF", prepare.placeholder, params.newName);
58
68
  case RenameType.Variable:
59
69
  return this.renameVariable(params);
70
+ case RenameType.Method:
71
+ return this.renameMethod(params);
60
72
  default:
61
73
  return undefined;
62
74
  }
@@ -73,6 +85,23 @@ class Rename {
73
85
  }
74
86
  return workspace;
75
87
  }
88
+ renameMethod(params) {
89
+ var _a, _b;
90
+ const workspace = { documentChanges: [] };
91
+ const refs = new references_1.References(this.reg).references(params);
92
+ for (const r of refs) {
93
+ const doc = { uri: r.uri, version: 1 };
94
+ const edit = LServer.TextDocumentEdit.create(doc, [LServer.TextEdit.replace(r.range, params.newName)]);
95
+ (_a = workspace.documentChanges) === null || _a === void 0 ? void 0 : _a.push(edit);
96
+ }
97
+ const def = new definition_1.Definition(this.reg).find(params.textDocument, params.position);
98
+ if (def) {
99
+ const doc = { uri: params.textDocument.uri, version: 1 };
100
+ const edit = LServer.TextDocumentEdit.create(doc, [LServer.TextEdit.replace(def === null || def === void 0 ? void 0 : def.range, params.newName)]);
101
+ (_b = workspace.documentChanges) === null || _b === void 0 ? void 0 : _b.push(edit);
102
+ }
103
+ return workspace;
104
+ }
76
105
  }
77
106
  exports.Rename = Rename;
78
107
  //# sourceMappingURL=rename.js.map
@@ -127,6 +127,6 @@ class SemanticHighlighting {
127
127
  return ret;
128
128
  }
129
129
  }
130
- SemanticHighlighting.tokenTypes = [];
131
130
  exports.SemanticHighlighting = SemanticHighlighting;
131
+ SemanticHighlighting.tokenTypes = [];
132
132
  //# sourceMappingURL=semantic.js.map
@@ -9,7 +9,7 @@ var ClassCategory;
9
9
  ClassCategory["PersistentFactory"] = "11";
10
10
  ClassCategory["Exception"] = "40";
11
11
  ClassCategory["SharedObject"] = "45";
12
- })(ClassCategory = exports.ClassCategory || (exports.ClassCategory = {}));
12
+ })(ClassCategory || (exports.ClassCategory = ClassCategory = {}));
13
13
  class Class extends _abap_object_1.ABAPObject {
14
14
  constructor() {
15
15
  super(...arguments);
@@ -15,7 +15,7 @@ var EnhancementCategory;
15
15
  EnhancementCategory["Character"] = "2";
16
16
  EnhancementCategory["CharacterOrNumeric"] = "3";
17
17
  EnhancementCategory["Deep"] = "4";
18
- })(EnhancementCategory = exports.EnhancementCategory || (exports.EnhancementCategory = {}));
18
+ })(EnhancementCategory || (exports.EnhancementCategory = EnhancementCategory = {}));
19
19
  var TableCategory;
20
20
  (function (TableCategory) {
21
21
  TableCategory["Transparent"] = "TRANSP";
@@ -24,7 +24,7 @@ var TableCategory;
24
24
  TableCategory["Pooled"] = "POOL";
25
25
  TableCategory["View"] = "VIEW";
26
26
  TableCategory["Append"] = "APPEND";
27
- })(TableCategory = exports.TableCategory || (exports.TableCategory = {}));
27
+ })(TableCategory || (exports.TableCategory = TableCategory = {}));
28
28
  class Table extends _abstract_object_1.AbstractObject {
29
29
  getType() {
30
30
  return "TABL";
@@ -65,7 +65,7 @@ class Registry {
65
65
  }
66
66
  static abaplintVersion() {
67
67
  // magic, see build script "version.sh"
68
- return "2.101.8";
68
+ return "2.101.10";
69
69
  }
70
70
  getDDICReferences() {
71
71
  return this.ddicReferences;
@@ -17,5 +17,5 @@ var RuleTag;
17
17
  RuleTag["Styleguide"] = "Styleguide";
18
18
  /** Single file compatible, the rule gives correct results when having only information about the single file */
19
19
  RuleTag["SingleFile"] = "SingleFile";
20
- })(RuleTag = exports.RuleTag || (exports.RuleTag = {}));
20
+ })(RuleTag || (exports.RuleTag = RuleTag = {}));
21
21
  //# sourceMappingURL=_irule.js.map
@@ -2672,9 +2672,16 @@ ${indentation} output = ${topTarget}.`;
2672
2672
  const data = `DATA ${name} TYPE REF TO ${type}.\n` +
2673
2673
  indentation + abap + "\n" +
2674
2674
  indentation;
2675
- const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, high.getFirstToken().getStart(), data);
2676
- const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, found.getFirstToken().getStart(), found.getLastToken().getEnd(), name);
2677
- fix = edit_helper_1.EditHelper.merge(fix2, fix1);
2675
+ if (found.getFirstToken().getStart().equals(high.getFirstToken().getStart())
2676
+ && found.getLastToken().getEnd().equals(high.getLastToken().getStart())) {
2677
+ // full statement = standalone NEW expression
2678
+ fix = edit_helper_1.EditHelper.replaceRange(lowFile, high.getFirstToken().getStart(), high.getLastToken().getEnd(), abap);
2679
+ }
2680
+ else {
2681
+ const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, high.getFirstToken().getStart(), data);
2682
+ const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, found.getFirstToken().getStart(), found.getLastToken().getEnd(), name);
2683
+ fix = edit_helper_1.EditHelper.merge(fix2, fix1);
2684
+ }
2678
2685
  }
2679
2686
  if (fix) {
2680
2687
  return issue_1.Issue.atToken(lowFile, high.getFirstToken(), "Use CREATE OBJECT instead of NEW", this.getMetadata().key, this.conf.severity, fix);
@@ -62,24 +62,24 @@ class EmptyStructure extends _abap_rule_1.ABAPRule {
62
62
  }
63
63
  const candidates = [];
64
64
  if (this.getConfig().loop === true) {
65
- candidates.push(...stru.findAllStructures(Structures.Loop));
65
+ candidates.push(...stru.findAllStructuresRecursive(Structures.Loop));
66
66
  }
67
67
  if (this.getConfig().while === true) {
68
- candidates.push(...stru.findAllStructures(Structures.While));
68
+ candidates.push(...stru.findAllStructuresRecursive(Structures.While));
69
69
  }
70
70
  if (this.getConfig().case === true) {
71
- candidates.push(...stru.findAllStructures(Structures.Case));
71
+ candidates.push(...stru.findAllStructuresRecursive(Structures.Case));
72
72
  }
73
73
  if (this.getConfig().select === true) {
74
- candidates.push(...stru.findAllStructures(Structures.Select));
74
+ candidates.push(...stru.findAllStructuresRecursive(Structures.Select));
75
75
  }
76
76
  if (this.getConfig().do === true) {
77
- candidates.push(...stru.findAllStructures(Structures.Do));
77
+ candidates.push(...stru.findAllStructuresRecursive(Structures.Do));
78
78
  }
79
79
  if (this.getConfig().at === true) {
80
- candidates.push(...stru.findAllStructures(Structures.At));
81
- candidates.push(...stru.findAllStructures(Structures.AtFirst));
82
- candidates.push(...stru.findAllStructures(Structures.AtLast));
80
+ candidates.push(...stru.findAllStructuresRecursive(Structures.At));
81
+ candidates.push(...stru.findAllStructuresRecursive(Structures.AtFirst));
82
+ candidates.push(...stru.findAllStructuresRecursive(Structures.AtLast));
83
83
  }
84
84
  for (const l of candidates) {
85
85
  if (l.getChildren().length === 2) {
@@ -89,7 +89,7 @@ class EmptyStructure extends _abap_rule_1.ABAPRule {
89
89
  }
90
90
  }
91
91
  if (this.getConfig().try === true) {
92
- const tries = stru.findAllStructures(Structures.Try);
92
+ const tries = stru.findAllStructuresRecursive(Structures.Try);
93
93
  for (const t of tries) {
94
94
  const normal = t.findDirectStructure(Structures.Body);
95
95
  if (normal === undefined) {
@@ -100,9 +100,9 @@ class EmptyStructure extends _abap_rule_1.ABAPRule {
100
100
  }
101
101
  }
102
102
  if (this.getConfig().if === true) {
103
- const tries = stru.findAllStructures(Structures.If)
104
- .concat(stru.findAllStructures(Structures.Else))
105
- .concat(stru.findAllStructures(Structures.ElseIf));
103
+ const tries = stru.findAllStructuresRecursive(Structures.If)
104
+ .concat(stru.findAllStructuresRecursive(Structures.Else))
105
+ .concat(stru.findAllStructuresRecursive(Structures.ElseIf));
106
106
  for (const t of tries) {
107
107
  const normal = t.findDirectStructure(Structures.Body);
108
108
  if (normal === undefined) {
@@ -113,7 +113,7 @@ class EmptyStructure extends _abap_rule_1.ABAPRule {
113
113
  }
114
114
  }
115
115
  if (this.getConfig().when === true) {
116
- const tries = stru.findAllStructures(Structures.When);
116
+ const tries = stru.findAllStructuresRecursive(Structures.When);
117
117
  for (const t of tries) {
118
118
  if (t.getChildren().length === 1) {
119
119
  const token = t.getFirstToken();
@@ -18,7 +18,7 @@ var KeywordCaseStyle;
18
18
  (function (KeywordCaseStyle) {
19
19
  KeywordCaseStyle["Upper"] = "upper";
20
20
  KeywordCaseStyle["Lower"] = "lower";
21
- })(KeywordCaseStyle = exports.KeywordCaseStyle || (exports.KeywordCaseStyle = {}));
21
+ })(KeywordCaseStyle || (exports.KeywordCaseStyle = KeywordCaseStyle = {}));
22
22
  class KeywordCaseConf extends _basic_rule_config_1.BasicRuleConfig {
23
23
  constructor() {
24
24
  super(...arguments);
@@ -11,7 +11,7 @@ var NewlineLogic;
11
11
  (function (NewlineLogic) {
12
12
  NewlineLogic["Exact"] = "exact";
13
13
  NewlineLogic["Less"] = "less";
14
- })(NewlineLogic = exports.NewlineLogic || (exports.NewlineLogic = {}));
14
+ })(NewlineLogic || (exports.NewlineLogic = NewlineLogic = {}));
15
15
  class NewlineBetweenMethodsConf extends _basic_rule_config_1.BasicRuleConfig {
16
16
  constructor() {
17
17
  super(...arguments);
@@ -6,5 +6,5 @@ var Severity;
6
6
  Severity["Error"] = "Error";
7
7
  Severity["Warning"] = "Warning";
8
8
  Severity["Info"] = "Info";
9
- })(Severity = exports.Severity || (exports.Severity = {}));
9
+ })(Severity || (exports.Severity = Severity = {}));
10
10
  //# sourceMappingURL=severity.js.map
@@ -18,7 +18,7 @@ var Version;
18
18
  Version["v756"] = "v756";
19
19
  Version["v757"] = "v757";
20
20
  Version["Cloud"] = "Cloud";
21
- })(Version = exports.Version || (exports.Version = {}));
21
+ })(Version || (exports.Version = Version = {}));
22
22
  exports.defaultVersion = Version.v757;
23
23
  function getPreviousVersion(v) {
24
24
  if (v === Version.OpenABAP) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/core",
3
- "version": "2.101.8",
3
+ "version": "2.101.10",
4
4
  "description": "abaplint - Core API",
5
5
  "main": "build/src/index.js",
6
6
  "typings": "build/abaplint.d.ts",
@@ -48,17 +48,17 @@
48
48
  },
49
49
  "homepage": "https://abaplint.org",
50
50
  "devDependencies": {
51
- "@microsoft/api-extractor": "^7.35.0",
51
+ "@microsoft/api-extractor": "^7.35.1",
52
52
  "@types/chai": "^4.3.5",
53
53
  "@types/mocha": "^10.0.1",
54
54
  "@types/node": "^20.2.5",
55
55
  "chai": "^4.3.7",
56
56
  "eslint": "^8.41.0",
57
57
  "mocha": "^10.2.0",
58
- "c8": "^7.13.0",
58
+ "c8": "^7.14.0",
59
59
  "source-map-support": "^0.5.21",
60
60
  "ts-json-schema-generator": "^1.2.0",
61
- "typescript": "^5.0.4"
61
+ "typescript": "^5.1.3"
62
62
  },
63
63
  "dependencies": {
64
64
  "fast-xml-parser": "^4.2.2",