@abaplint/core 2.113.70 → 2.113.71

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.
@@ -163,8 +163,12 @@ class StatementParser {
163
163
  else {
164
164
  wa.statements[i] = new nodes_1.StatementNode(new _statement_1.NativeSQL()).setChildren(this.tokensToNodes(statement.getTokens()));
165
165
  if (statement.concatTokens().toUpperCase().endsWith("ENDMETHOD.")) {
166
- // yea, this is not completely correct
167
- wa.statements[i] = new nodes_1.StatementNode(new Statements.EndMethod()).setChildren(this.tokensToNodes(statement.getTokens()));
166
+ const tokens = statement.getTokens();
167
+ const startTokens = this.tokensToNodes(tokens.slice(tokens.length - 2, tokens.length));
168
+ const endTokens = this.tokensToNodes(tokens.slice(0, tokens.length - 2));
169
+ wa.statements[i] = new nodes_1.StatementNode(new _statement_1.NativeSQL()).setChildren(endTokens);
170
+ const item = new nodes_1.StatementNode(new Statements.EndMethod()).setChildren(startTokens);
171
+ wa.statements.splice(i + 1, 0, item);
168
172
  sql = false;
169
173
  }
170
174
  }
@@ -7,6 +7,7 @@ const component_compare_1 = require("./component_compare");
7
7
  const inline_data_1 = require("./inline_data");
8
8
  const fstarget_1 = require("./fstarget");
9
9
  const target_1 = require("./target");
10
+ const source_1 = require("./source");
10
11
  class LoopGroupBy {
11
12
  runSyntax(node, input) {
12
13
  for (const t of node.findAllExpressions(Expressions.Target)) {
@@ -21,6 +22,9 @@ class LoopGroupBy {
21
22
  for (const t of node.findAllExpressions(Expressions.FSTarget)) {
22
23
  new fstarget_1.FSTarget().runSyntax(t, input, new basic_1.VoidType("todoGroupBy"));
23
24
  }
25
+ for (const t of node.findDirectExpressions(Expressions.Source)) {
26
+ new source_1.Source().runSyntax(t, input, new basic_1.VoidType("todoGroupBy"));
27
+ }
24
28
  for (const c of node.findDirectExpressions(Expressions.LoopGroupByComponent)) {
25
29
  for (const t of c.findDirectExpressions(Expressions.ComponentCompareSingle)) {
26
30
  new component_compare_1.ComponentCompare().runSyntax(t, input);
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.DeleteMemory = void 0;
4
+ const Expressions = require("../../2_statements/expressions");
5
+ const source_1 = require("../expressions/source");
6
+ class DeleteMemory {
7
+ runSyntax(node, input) {
8
+ for (const s of node.findDirectExpressions(Expressions.Source)) {
9
+ new source_1.Source().runSyntax(s, input);
10
+ }
11
+ }
12
+ }
13
+ exports.DeleteMemory = DeleteMemory;
14
+ //# sourceMappingURL=delete_memory.js.map
@@ -18,6 +18,7 @@ const statics_1 = require("./structures/statics");
18
18
  const constants_1 = require("./structures/constants");
19
19
  const class_definition_1 = require("../types/class_definition");
20
20
  const interface_definition_1 = require("../types/interface_definition");
21
+ const delete_memory_1 = require("./statements/delete_memory");
21
22
  const perform_1 = require("./statements/perform");
22
23
  const type_1 = require("./statements/type");
23
24
  const constant_1 = require("./statements/constant");
@@ -272,6 +273,7 @@ if (Object.keys(map).length === 0) {
272
273
  addToMap(new modify_internal_1.ModifyInternal());
273
274
  addToMap(new read_textpool_1.ReadTextpool());
274
275
  addToMap(new editor_call_1.EditorCall());
276
+ addToMap(new delete_memory_1.DeleteMemory());
275
277
  }
276
278
  // -----------------------------------
277
279
  class SyntaxLogic {
@@ -67,7 +67,7 @@ class Registry {
67
67
  }
68
68
  static abaplintVersion() {
69
69
  // magic, see build script "version.sh"
70
- return "2.113.70";
70
+ return "2.113.71";
71
71
  }
72
72
  getDDICReferences() {
73
73
  return this.ddicReferences;
@@ -32,7 +32,7 @@ class InStatementIndentation extends _abap_rule_1.ABAPRule {
32
32
  title: "In-statement indentation",
33
33
  shortDescription: "Checks alignment within statements which span multiple lines.",
34
34
  extendedInformation: `Lines following the first line should be indented once (2 spaces).
35
-
35
+
36
36
  For block declaration statements, lines after the first should be indented an additional time (default: +2 spaces)
37
37
  to distinguish them better from code within the block.`,
38
38
  badExample: `IF 1 = 1
@@ -70,7 +70,9 @@ ENDIF.`,
70
70
  }
71
71
  }
72
72
  for (const s of file.getStatements()) {
73
- if (s.get() instanceof _statement_1.Comment || s.get() instanceof _statement_1.Unknown) {
73
+ if (s.get() instanceof _statement_1.Comment
74
+ || s.get() instanceof _statement_1.Unknown
75
+ || s.get() instanceof _statement_1.NativeSQL) {
74
76
  continue;
75
77
  }
76
78
  const tokens = s.getTokens();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/core",
3
- "version": "2.113.70",
3
+ "version": "2.113.71",
4
4
  "description": "abaplint - Core API",
5
5
  "main": "build/src/index.js",
6
6
  "typings": "build/abaplint.d.ts",