@abaplint/core 2.95.1 → 2.95.3

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.
@@ -90,7 +90,7 @@ class ExpandMacros {
90
90
  if (type instanceof _statement_1.Unknown || type instanceof _statement_1.MacroCall) {
91
91
  const macroName = this.findName(statement.getTokens());
92
92
  if (macroName && this.macros.isMacro(macroName)) {
93
- result.push(new statement_node_1.StatementNode(new _statement_1.MacroCall()).setChildren(this.tokensToNodes(statement.getTokens())));
93
+ result.push(new statement_node_1.StatementNode(new _statement_1.MacroCall(), statement.getColon()).setChildren(this.tokensToNodes(statement.getTokens())));
94
94
  const expanded = this.expandContents(macroName, statement);
95
95
  const handled = this.handleMacros(expanded);
96
96
  for (const e of handled.statements) {
@@ -63,7 +63,7 @@ class Registry {
63
63
  }
64
64
  static abaplintVersion() {
65
65
  // magic, see build script "version.sh"
66
- return "2.95.1";
66
+ return "2.95.3";
67
67
  }
68
68
  getDDICReferences() {
69
69
  return this.references;
@@ -52,6 +52,9 @@ _hello.`,
52
52
  for (let j = i + 1; j < statements.length; j++) {
53
53
  const sub = statements[j];
54
54
  if (sub.getFirstToken().getStart() instanceof position_1.VirtualPosition) {
55
+ if (sub.get() instanceof _statement_1.MacroCall) {
56
+ continue;
57
+ }
55
58
  if (replace !== "") {
56
59
  replace += "\n";
57
60
  }
@@ -61,8 +64,15 @@ _hello.`,
61
64
  break;
62
65
  }
63
66
  }
64
- const fix = edit_helper_1.EditHelper.replaceRange(file, statementNode.getStart(), statementNode.getEnd(), replace);
67
+ if (statementNode.getColon()) {
68
+ replace += "\n";
69
+ }
70
+ const fix1 = edit_helper_1.EditHelper.deleteStatement(file, statementNode);
71
+ const fix2 = edit_helper_1.EditHelper.insertAt(file, statementNode.getStart(), replace);
72
+ const fix = edit_helper_1.EditHelper.merge(fix1, fix2);
65
73
  issues.push(issue_1.Issue.atStatement(file, statementNode, message, this.getMetadata().key, this.conf.severity, fix));
74
+ // only one fix at a time per file
75
+ break;
66
76
  }
67
77
  return issues;
68
78
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/core",
3
- "version": "2.95.1",
3
+ "version": "2.95.3",
4
4
  "description": "abaplint - Core API",
5
5
  "main": "build/src/index.js",
6
6
  "typings": "build/abaplint.d.ts",