@abaplint/core 2.113.92 → 2.113.93

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.
@@ -9,7 +9,7 @@ class CDSCondition extends combi_1.Expression {
9
9
  const name = (0, combi_1.seq)(_1.CDSName, (0, combi_1.optPrio)((0, combi_1.seq)(".", (0, combi_1.altPrio)(_1.CDSString, _1.CDSName))));
10
10
  const left = (0, combi_1.altPrio)(_1.CDSString, _1.CDSFunction, name);
11
11
  const operators = (0, combi_1.altPrio)("=", (0, combi_1.seq)("!", "="), (0, combi_1.seq)("<", ">"), (0, combi_1.seq)(">", "="), (0, combi_1.seq)("<", "="), "<", ">", "LIKE", "NOT LIKE");
12
- const compare = (0, combi_1.seq)(left, operators, (0, combi_1.alt)(left, cds_integer_1.CDSInteger));
12
+ const compare = (0, combi_1.seq)(left, operators, (0, combi_1.altPrio)(left, cds_integer_1.CDSInteger));
13
13
  const is = (0, combi_1.seq)(left, "IS", (0, combi_1.optPrio)("NOT"), (0, combi_1.altPrio)("INITIAL", "NULL"));
14
14
  const condition = (0, combi_1.seq)((0, combi_1.optPrio)("NOT"), (0, combi_1.altPrio)(compare, is));
15
15
  const paren = (0, combi_1.seq)("(", CDSCondition, ")");
@@ -5,7 +5,7 @@ const combi_1 = require("../../abap/2_statements/combi");
5
5
  class CDSName extends combi_1.Expression {
6
6
  getRunnable() {
7
7
  const pre = (0, combi_1.seq)("/", (0, combi_1.regex)(/^[\w_]+$/), "/");
8
- return (0, combi_1.seq)((0, combi_1.opt)(":"), (0, combi_1.opt)(pre), (0, combi_1.regex)(/^\$?#?[\w_]+$/));
8
+ return (0, combi_1.seq)((0, combi_1.optPrio)(":"), (0, combi_1.optPrio)(pre), (0, combi_1.regex)(/^\$?#?[\w_]+$/));
9
9
  }
10
10
  }
11
11
  exports.CDSName = CDSName;
@@ -8,6 +8,7 @@ const _abap_object_1 = require("../objects/_abap_object");
8
8
  const dump_scope_1 = require("./dump_scope");
9
9
  const virtual_position_1 = require("../virtual_position");
10
10
  const objects_1 = require("../objects");
11
+ const cds_lexer_1 = require("../cds/cds_lexer");
11
12
  class Help {
12
13
  static find(reg, textDocument, position) {
13
14
  const abapFile = _lsp_utils_1.LSPUtils.getABAPFile(reg, textDocument.uri);
@@ -27,7 +28,7 @@ class Help {
27
28
  /////////////////////////////////////////////////
28
29
  static dumpDDLS(obj, reg) {
29
30
  let content = "";
30
- content += "<h1>" + obj.getType + " " + obj.getName() + "</h1>\n";
31
+ content += "<h1>" + obj.getType() + " " + obj.getName() + "</h1>\n";
31
32
  content += obj.getDescription() + "\n";
32
33
  content += obj.getParsingIssues().map(i => i.getMessage()).join("<br>\n");
33
34
  content += `<hr>\n`;
@@ -37,6 +38,15 @@ class Help {
37
38
  content += `<hr>\n`;
38
39
  content += `<pre>` + obj.parseType(reg).toText(0) + "</pre>\n";
39
40
  content += `<hr>\n`;
41
+ const file = obj.findSourceFile();
42
+ if (file) {
43
+ const tokens = cds_lexer_1.CDSLexer.run(file);
44
+ content += `<h3>Tokens</h3>\n<pre>\n`;
45
+ for (const t of tokens) {
46
+ content += JSON.stringify(t) + "\n";
47
+ }
48
+ content += `</pre>\n`;
49
+ }
40
50
  return content;
41
51
  }
42
52
  static dumpABAP(file, reg, textDocument, position) {
@@ -67,7 +67,7 @@ class Registry {
67
67
  }
68
68
  static abaplintVersion() {
69
69
  // magic, see build script "version.sh"
70
- return "2.113.92";
70
+ return "2.113.93";
71
71
  }
72
72
  getDDICReferences() {
73
73
  return this.ddicReferences;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/core",
3
- "version": "2.113.92",
3
+ "version": "2.113.93",
4
4
  "description": "abaplint - Core API",
5
5
  "main": "build/src/index.js",
6
6
  "typings": "build/abaplint.d.ts",