@abaplint/core 2.105.18 → 2.105.19

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.
@@ -5,7 +5,7 @@ const combi_1 = require("../combi");
5
5
  const _1 = require(".");
6
6
  class RaiseWith extends combi_1.Expression {
7
7
  getRunnable() {
8
- const wit = (0, combi_1.seq)("WITH", _1.SimpleSource3, (0, combi_1.opt)(_1.SimpleSource3), (0, combi_1.opt)(_1.SimpleSource3), (0, combi_1.opt)(_1.SimpleSource3));
8
+ const wit = (0, combi_1.seq)("WITH", _1.SimpleSource1, (0, combi_1.opt)(_1.SimpleSource1), (0, combi_1.opt)(_1.SimpleSource1), (0, combi_1.opt)(_1.SimpleSource1));
9
9
  return wit;
10
10
  }
11
11
  }
@@ -5,7 +5,7 @@ const Expressions = require("../../2_statements/expressions");
5
5
  const source_1 = require("./source");
6
6
  class RaiseWith {
7
7
  runSyntax(node, scope, filename) {
8
- for (const f of node.findDirectExpressions(Expressions.SimpleSource3)) {
8
+ for (const f of node.findDirectExpressions(Expressions.SimpleSource1)) {
9
9
  new source_1.Source().runSyntax(f, scope, filename);
10
10
  }
11
11
  }
@@ -65,7 +65,7 @@ class Registry {
65
65
  }
66
66
  static abaplintVersion() {
67
67
  // magic, see build script "version.sh"
68
- return "2.105.18";
68
+ return "2.105.19";
69
69
  }
70
70
  getDDICReferences() {
71
71
  return this.ddicReferences;
@@ -1152,7 +1152,7 @@ ${indentation}CATCH ${className} INTO ${targetName}.`;
1152
1152
  }
1153
1153
  startToken = node.getFirstToken();
1154
1154
  }
1155
- const withs = ((_f = node.findDirectExpression(Expressions.RaiseWith)) === null || _f === void 0 ? void 0 : _f.findDirectExpressions(Expressions.SimpleSource3)) || [];
1155
+ const withs = ((_f = node.findDirectExpression(Expressions.RaiseWith)) === null || _f === void 0 ? void 0 : _f.findDirectExpressions(Expressions.SimpleSource1)) || [];
1156
1156
  const className = ((_g = node.findDirectExpression(Expressions.ClassName)) === null || _g === void 0 ? void 0 : _g.concatTokens()) || "ERROR";
1157
1157
  const uniqueName1 = this.uniqueName(node.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);
1158
1158
  const uniqueName2 = this.uniqueName(node.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);
@@ -6,6 +6,7 @@ const Structures = require("../abap/3_structures/structures");
6
6
  const _abap_rule_1 = require("./_abap_rule");
7
7
  const _basic_rule_config_1 = require("./_basic_rule_config");
8
8
  const _irule_1 = require("./_irule");
9
+ const _statement_1 = require("../abap/2_statements/statements/_statement");
9
10
  class EmptyStructureConf extends _basic_rule_config_1.BasicRuleConfig {
10
11
  constructor() {
11
12
  super(...arguments);
@@ -60,6 +61,11 @@ class EmptyStructure extends _abap_rule_1.ABAPRule {
60
61
  if (stru === undefined) {
61
62
  return [];
62
63
  }
64
+ for (const statement of file.getStatements()) {
65
+ if (statement.get() instanceof _statement_1.Unknown) {
66
+ return []; // contains parser errors
67
+ }
68
+ }
63
69
  const candidates = [];
64
70
  if (this.getConfig().loop === true) {
65
71
  candidates.push(...stru.findAllStructuresRecursive(Structures.Loop));
@@ -7,6 +7,7 @@ const _basic_rule_config_1 = require("./_basic_rule_config");
7
7
  const _abap_rule_1 = require("./_abap_rule");
8
8
  const _irule_1 = require("./_irule");
9
9
  const nodes_1 = require("../abap/nodes");
10
+ const _statement_1 = require("../abap/2_statements/statements/_statement");
10
11
  class IdenticalContentsConf extends _basic_rule_config_1.BasicRuleConfig {
11
12
  }
12
13
  exports.IdenticalContentsConf = IdenticalContentsConf;
@@ -52,6 +53,11 @@ WRITE 'world'.`,
52
53
  if (structure === undefined) {
53
54
  return [];
54
55
  }
56
+ for (const statement of file.getStatements()) {
57
+ if (statement.get() instanceof _statement_1.Unknown) {
58
+ return []; // contains parser errors
59
+ }
60
+ }
55
61
  for (const i of structure.findAllStructuresRecursive(Structures.If)) {
56
62
  issues = issues.concat(this.analyzeIf(file, i));
57
63
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/core",
3
- "version": "2.105.18",
3
+ "version": "2.105.19",
4
4
  "description": "abaplint - Core API",
5
5
  "main": "build/src/index.js",
6
6
  "typings": "build/abaplint.d.ts",