@abaplint/core 2.92.2 → 2.93.2

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.
@@ -56,16 +56,15 @@ https://docs.abapopenchecks.org/checks/17/`,
56
56
  if (containsUnknown === true) {
57
57
  return [];
58
58
  }
59
- const routines = structure.findAllStructures(Structures.Form).concat(structure.findAllStructures(Structures.Method));
59
+ const routines = structure.findAllStructuresMulti([Structures.Form, Structures.Method]);
60
60
  for (const r of routines) {
61
61
  // one fix per routine
62
62
  this.fixed = false;
63
63
  this.mode = DEFINITION;
64
64
  this.moveTo = (_a = r.getFirstStatement()) === null || _a === void 0 ? void 0 : _a.getLastToken().getEnd();
65
- if (this.reg.getConfig().getVersion() !== version_1.Version.v702) {
66
- if (r.findFirstExpression(Expressions.InlineData)) {
67
- continue;
68
- }
65
+ if (this.reg.getConfig().getVersion() !== version_1.Version.v702
66
+ && r.findFirstExpression(Expressions.InlineData)) {
67
+ continue;
69
68
  }
70
69
  const found = this.walk(r, file);
71
70
  if (found) {
@@ -79,20 +78,23 @@ https://docs.abapopenchecks.org/checks/17/`,
79
78
  var _a, _b, _c, _d, _e, _f;
80
79
  let previous = undefined;
81
80
  for (const c of r.getChildren()) {
82
- if (c instanceof nodes_1.StatementNode && c.get() instanceof _statement_1.Comment) {
83
- continue;
84
- }
85
- else if (c instanceof nodes_1.StatementNode && c.get() instanceof Statements.Form) {
86
- continue;
87
- }
88
- else if (c instanceof nodes_1.StatementNode && c.get() instanceof Statements.MethodImplementation) {
89
- continue;
81
+ const get = c.get();
82
+ if (c instanceof nodes_1.StatementNode) {
83
+ if (get instanceof _statement_1.Comment) {
84
+ continue;
85
+ }
86
+ else if (get instanceof Statements.Form) {
87
+ continue;
88
+ }
89
+ else if (get instanceof Statements.MethodImplementation) {
90
+ continue;
91
+ }
90
92
  }
91
93
  if (c instanceof nodes_1.StructureNode
92
- && (c.get() instanceof Structures.Data
93
- || c.get() instanceof Structures.Types
94
- || c.get() instanceof Structures.Constants
95
- || c.get() instanceof Structures.Statics)) {
94
+ && (get instanceof Structures.Data
95
+ || get instanceof Structures.Types
96
+ || get instanceof Structures.Constants
97
+ || get instanceof Structures.Statics)) {
96
98
  if (this.mode === AFTER) {
97
99
  // These are chained structured statements
98
100
  let fix = undefined;
@@ -118,11 +120,11 @@ https://docs.abapopenchecks.org/checks/17/`,
118
120
  }
119
121
  }
120
122
  else if (c instanceof nodes_1.StatementNode
121
- && (c.get() instanceof Statements.Data
122
- || c.get() instanceof Statements.Type
123
- || c.get() instanceof Statements.Constant
124
- || c.get() instanceof Statements.Static
125
- || c.get() instanceof Statements.FieldSymbol)) {
123
+ && (get instanceof Statements.Data
124
+ || get instanceof Statements.Type
125
+ || get instanceof Statements.Constant
126
+ || get instanceof Statements.Static
127
+ || get instanceof Statements.FieldSymbol)) {
126
128
  if (this.mode === AFTER) {
127
129
  // only one fix per routine, as it reorders a lot
128
130
  let fix = undefined;
@@ -136,11 +138,11 @@ https://docs.abapopenchecks.org/checks/17/`,
136
138
  this.moveTo = c.getLastToken().getEnd();
137
139
  }
138
140
  }
139
- else if (c instanceof nodes_1.StructureNode && c.get() instanceof Structures.Define) {
141
+ else if (c instanceof nodes_1.StructureNode && get instanceof Structures.Define) {
140
142
  this.mode = IGNORE;
141
143
  return undefined;
142
144
  }
143
- else if (c instanceof nodes_1.StatementNode && c.get() instanceof _statement_1.Unknown) {
145
+ else if (c instanceof nodes_1.StatementNode && get instanceof _statement_1.Unknown) {
144
146
  this.mode = IGNORE;
145
147
  return undefined;
146
148
  }