@abaplint/core 2.113.221 → 2.113.223

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.
@@ -8,13 +8,13 @@ const loop_group_by_1 = require("../expressions/loop_group_by");
8
8
  class Loop {
9
9
  getMatcher() {
10
10
  const where = (0, combi_1.seq)("WHERE", (0, combi_1.alt)(expressions_1.ComponentCond, expressions_1.Dynamic));
11
- const group = (0, combi_1.ver)(version_1.Version.v740sp08, (0, combi_1.seq)("GROUP BY", loop_group_by_1.LoopGroupBy));
11
+ const group = (0, combi_1.ver)(version_1.Version.v740sp08, (0, combi_1.seq)("GROUP BY", loop_group_by_1.LoopGroupBy), version_1.Version.OpenABAP);
12
12
  const step = (0, combi_1.ver)(version_1.Version.v757, (0, combi_1.seq)("STEP", expressions_1.Source));
13
13
  const from = (0, combi_1.seq)("FROM", expressions_1.Source);
14
14
  const to = (0, combi_1.seq)("TO", expressions_1.Source);
15
15
  const usingKey = (0, combi_1.seq)("USING KEY", (0, combi_1.altPrio)(expressions_1.SimpleName, expressions_1.Dynamic));
16
16
  const options = (0, combi_1.per)(expressions_1.LoopTarget, from, to, where, usingKey, group, step);
17
- const at = (0, combi_1.seq)("AT", (0, combi_1.opt)((0, combi_1.seq)("SCREEN", (0, combi_1.failCombinator)())), (0, combi_1.opt)((0, combi_1.ver)(version_1.Version.v740sp08, "GROUP")), expressions_1.LoopSource, (0, combi_1.opt)(options));
17
+ const at = (0, combi_1.seq)("AT", (0, combi_1.opt)((0, combi_1.seq)("SCREEN", (0, combi_1.failCombinator)())), (0, combi_1.opt)((0, combi_1.ver)(version_1.Version.v740sp08, "GROUP", version_1.Version.OpenABAP)), expressions_1.LoopSource, (0, combi_1.opt)(options));
18
18
  return (0, combi_1.seq)("LOOP", (0, combi_1.opt)(at));
19
19
  }
20
20
  }
@@ -35,7 +35,8 @@ class Result {
35
35
  }
36
36
  add(text, row, col, mode) {
37
37
  if (text.length > 0) {
38
- if (mode === Mode.SingleLineComment) {
38
+ if (mode === Mode.SingleLineComment
39
+ && (text.startsWith("--") || text.startsWith("//"))) {
39
40
  this.result.push(new tokens_1.Comment(new position_1.Position(row, col - text.length), text));
40
41
  }
41
42
  else {
@@ -15,7 +15,6 @@ class CDSParser {
15
15
  }
16
16
  let tokens = cds_lexer_1.CDSLexer.run(file);
17
17
  tokens = tokens.filter(t => !(t instanceof tokens_1.Comment));
18
- // console.dir(tokens);
19
18
  let res = combi_1.Combi.run(new Expressions.CDSDefineView(), tokens, version_1.defaultVersion);
20
19
  if (res === undefined || !(res[0] instanceof nodes_1.ExpressionNode)) {
21
20
  res = combi_1.Combi.run(new Expressions.CDSDefineAbstract(), tokens, version_1.defaultVersion);
@@ -6,7 +6,7 @@ const combi_1 = require("../../abap/2_statements/combi");
6
6
  class CDSFunctionInput extends combi_1.Expression {
7
7
  getRunnable() {
8
8
  const qualified = (0, combi_1.seq)(_1.CDSName, (0, combi_1.opt)(_1.CDSParameters), (0, combi_1.starPrio)((0, combi_1.seq)(".", _1.CDSName, (0, combi_1.opt)(_1.CDSParameters))));
9
- const input = (0, combi_1.altPrio)(_1.CDSArithmetics, _1.CDSCast, _1.CDSFunction, _1.CDSCase, _1.CDSString, qualified, _1.CDSInteger);
9
+ const input = (0, combi_1.altPrio)(_1.CDSArithmetics, _1.CDSAggregate, _1.CDSCast, _1.CDSFunction, _1.CDSCase, _1.CDSString, qualified, _1.CDSInteger);
10
10
  return input;
11
11
  }
12
12
  }
@@ -8,7 +8,7 @@ class CDSJoin extends combi_1.Expression {
8
8
  getRunnable() {
9
9
  const cond = (0, combi_1.seq)(_1.CDSSource, "ON", cds_condition_1.CDSCondition);
10
10
  const foo = (0, combi_1.altPrio)((0, combi_1.seq)("(", cond, ")"), cond);
11
- return (0, combi_1.seq)((0, combi_1.optPrio)((0, combi_1.altPrio)("LEFT OUTER TO ONE", "LEFT OUTER", "INNER", "CROSS", "RIGHT OUTER")), "JOIN", foo);
11
+ return (0, combi_1.seq)((0, combi_1.optPrio)((0, combi_1.altPrio)("LEFT OUTER TO ONE", "LEFT OUTER", "INNER", "CROSS", "RIGHT OUTER")), "JOIN", (0, combi_1.altPrio)(foo, _1.CDSSource));
12
12
  }
13
13
  }
14
14
  exports.CDSJoin = CDSJoin;
@@ -5,7 +5,7 @@ const _1 = require(".");
5
5
  const combi_1 = require("../../abap/2_statements/combi");
6
6
  class CDSSource extends combi_1.Expression {
7
7
  getRunnable() {
8
- return (0, combi_1.seq)(_1.CDSName, (0, combi_1.optPrio)(_1.CDSParametersSelect), (0, combi_1.optPrio)(_1.CDSAs));
8
+ return (0, combi_1.seq)(_1.CDSName, (0, combi_1.optPrio)(_1.CDSParametersSelect), (0, combi_1.opt)((0, combi_1.altPrio)(_1.CDSAs, _1.CDSName)));
9
9
  }
10
10
  }
11
11
  exports.CDSSource = CDSSource;
@@ -4,8 +4,10 @@ exports.CDSString = void 0;
4
4
  const combi_1 = require("../../abap/2_statements/combi");
5
5
  class CDSString extends combi_1.Expression {
6
6
  getRunnable() {
7
+ const abap = (0, combi_1.seq)("abap", ".", (0, combi_1.regex)(/^char'\w'$/));
7
8
  // https://stackoverflow.com/a/57754227
8
- return (0, combi_1.regex)(/^'[A-Za-zÀ-ž\u0370-\u03FF\u0400-\u04FF:\| -_]*'$/);
9
+ const reg = (0, combi_1.regex)(/^'[A-Za-zÀ-ž\u0370-\u03FF\u0400-\u04FF:\| -_]*'$/);
10
+ return (0, combi_1.altPrio)(reg, abap);
9
11
  }
10
12
  }
11
13
  exports.CDSString = CDSString;
@@ -43,7 +43,7 @@ class Help {
43
43
  const tokens = cds_lexer_1.CDSLexer.run(file);
44
44
  content += `<h3>Tokens</h3>\n<pre>\n`;
45
45
  for (const t of tokens) {
46
- content += JSON.stringify(t) + "\n";
46
+ content += JSON.stringify(t) + " " + t.constructor.name + "\n";
47
47
  }
48
48
  content += `</pre>\n`;
49
49
  }
@@ -67,7 +67,7 @@ class Registry {
67
67
  }
68
68
  static abaplintVersion() {
69
69
  // magic, see build script "version.sh"
70
- return "2.113.221";
70
+ return "2.113.223";
71
71
  }
72
72
  getDDICReferences() {
73
73
  return this.ddicReferences;
@@ -81,8 +81,8 @@ class ImplementMethods extends _abap_rule_1.ABAPRule {
81
81
  continue;
82
82
  }
83
83
  else {
84
- const message = "Abstract methods can only be defined in abstract classes.";
85
- const issue = issue_1.Issue.atIdentifier(def.identifier, message, this.getMetadata().key, this.conf.severity);
84
+ const message = "Abstract methods can only be defined in abstract classes, " + md.name;
85
+ const issue = issue_1.Issue.atIdentifier(md.identifier, message, this.getMetadata().key, this.conf.severity);
86
86
  ret.push(issue);
87
87
  break;
88
88
  }
@@ -193,10 +193,13 @@ class ImplementMethods extends _abap_rule_1.ABAPRule {
193
193
  continue;
194
194
  }
195
195
  else {
196
- const message = "Abstract methods can only be defined in abstract classes.";
197
- const issue = issue_1.Issue.atIdentifier(def.identifier, message, this.getMetadata().key, this.conf.severity);
196
+ // there is some bug here, which I cannot reproduce right now
197
+ /*
198
+ const message = "Abstract methods can only be defined in abstract classes, " + m.method.name;
199
+ const issue = Issue.atIdentifier(m.method.identifier, message, this.getMetadata().key, this.conf.severity);
198
200
  ret.push(issue);
199
201
  break;
202
+ */
200
203
  }
201
204
  }
202
205
  if (this.isImplemented(m, def, impl) === false) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/core",
3
- "version": "2.113.221",
3
+ "version": "2.113.223",
4
4
  "description": "abaplint - Core API",
5
5
  "main": "build/src/index.js",
6
6
  "typings": "build/abaplint.d.ts",
@@ -50,12 +50,12 @@
50
50
  },
51
51
  "homepage": "https://abaplint.org",
52
52
  "devDependencies": {
53
- "@microsoft/api-extractor": "^7.52.15",
53
+ "@microsoft/api-extractor": "^7.53.0",
54
54
  "@types/chai": "^4.3.20",
55
55
  "@types/mocha": "^10.0.10",
56
56
  "@types/node": "^24.6.2",
57
57
  "chai": "^4.5.0",
58
- "eslint": "^9.36.0",
58
+ "eslint": "^9.37.0",
59
59
  "mocha": "^11.7.4",
60
60
  "c8": "^10.1.3",
61
61
  "source-map-support": "^0.5.21",
@@ -63,7 +63,7 @@
63
63
  "typescript": "^5.9.3"
64
64
  },
65
65
  "dependencies": {
66
- "fast-xml-parser": "^5.2.5",
66
+ "fast-xml-parser": "^5.3.0",
67
67
  "json5": "^2.2.3",
68
68
  "vscode-languageserver-types": "^3.17.5"
69
69
  }