@abaplint/core 2.113.46 → 2.113.48

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.
@@ -6,7 +6,7 @@ class Field extends combi_1.Expression {
6
6
  getRunnable() {
7
7
  // "&1" can be used for almost anything(field names, method names etc.) in macros
8
8
  // field names with only digits should not be possible
9
- return (0, combi_1.regex)(/^[&_!]?\*?\w*(\/\w+\/)?\d*[a-zA-Z_%\$][\w\*%\$\?#]*(~\w+)?$/);
9
+ return (0, combi_1.regex)(/^[&_!?]?\*?\w*(\/\w+\/)?\d*[a-zA-Z_%\$][\w\*%\$\?#]*(~\w+)?$/);
10
10
  }
11
11
  }
12
12
  exports.Field = Field;
@@ -6,7 +6,7 @@ const tokens_1 = require("../../1_lexer/tokens");
6
6
  const _1 = require(".");
7
7
  class FieldOffset extends combi_1.Expression {
8
8
  getRunnable() {
9
- const offset = (0, combi_1.seq)((0, combi_1.tok)(tokens_1.Plus), (0, combi_1.altPrio)((0, combi_1.regex)(/^\d+$/), _1.SimpleFieldChain2));
9
+ const offset = (0, combi_1.seq)((0, combi_1.tok)(tokens_1.Plus), (0, combi_1.optPrio)((0, combi_1.altPrio)((0, combi_1.regex)(/^\d+$/), _1.SimpleFieldChain2)));
10
10
  return offset;
11
11
  }
12
12
  }
@@ -7,7 +7,8 @@ const version_1 = require("../../../version");
7
7
  class Break {
8
8
  getMatcher() {
9
9
  const next = (0, combi_1.str)("AT NEXT APPLICATION STATEMENT");
10
- const ret = (0, combi_1.altPrio)((0, combi_1.seq)("BREAK-POINT", (0, combi_1.optPrio)((0, combi_1.altPrio)(next, expressions_1.Source))), (0, combi_1.seq)("BREAK", expressions_1.FieldSub));
10
+ // note BREAK is a special macro that wraps the parameter in a char
11
+ const ret = (0, combi_1.altPrio)((0, combi_1.seq)("BREAK-POINT", (0, combi_1.optPrio)((0, combi_1.altPrio)(next, expressions_1.Source))), (0, combi_1.seq)("BREAK", (0, combi_1.starPrio)((0, combi_1.regex)(/.*/))));
11
12
  return (0, combi_1.verNot)(version_1.Version.Cloud, ret);
12
13
  }
13
14
  }
@@ -13,7 +13,7 @@ class ReadTable {
13
13
  const key = (0, combi_1.seq)((0, combi_1.altPrio)("WITH KEY", "WITH TABLE KEY"), (0, combi_1.alt)(expressions_1.ComponentCompareSimple, components, (0, combi_1.seq)((0, combi_1.optPrio)("="), expressions_1.Source)));
14
14
  const using = (0, combi_1.seq)("USING KEY", (0, combi_1.alt)(expressions_1.Field, expressions_1.Dynamic));
15
15
  const from = (0, combi_1.seq)("FROM", expressions_1.Source);
16
- const perm = (0, combi_1.per)((0, combi_1.alt)(index, key, from), expressions_1.ReadTableTarget, using, comparing, "CASTING", "TRANSPORTING ALL FIELDS", (0, combi_1.seq)("TRANSPORTING", transporting_fields_1.TransportingFields), "BINARY SEARCH");
16
+ const perm = (0, combi_1.per)((0, combi_1.alt)(index, key, from), expressions_1.ReadTableTarget, using, comparing, "CASTING", (0, combi_1.seq)("TRANSPORTING", (0, combi_1.altPrio)("ALL FIELDS", "NO FIELDS", transporting_fields_1.TransportingFields)), "BINARY SEARCH");
17
17
  return (0, combi_1.seq)("READ TABLE", (0, combi_1.alt)(expressions_1.SimpleSource2, (0, combi_1.ver)(version_1.Version.v740sp02, expressions_1.Source)), (0, combi_1.opt)(perm));
18
18
  }
19
19
  }
@@ -492,9 +492,11 @@ class TypeUtils {
492
492
  && this.isCharLike(source)) {
493
493
  return true;
494
494
  }
495
+ else if (source instanceof basic_1.StructureType) {
496
+ return this.isCharLikeStrict(source);
497
+ }
495
498
  else if (source instanceof basic_1.DataReference
496
499
  || source instanceof basic_1.ObjectReferenceType
497
- || source instanceof basic_1.StructureType
498
500
  || source instanceof basic_1.GenericObjectReferenceType) {
499
501
  return false;
500
502
  }
@@ -2,15 +2,13 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.Diagnostics = void 0;
4
4
  const LServer = require("vscode-languageserver-types");
5
- const _lsp_utils_1 = require("./_lsp_utils");
6
5
  const severity_1 = require("../severity");
7
6
  class Diagnostics {
8
7
  constructor(reg) {
9
8
  this.reg = reg;
10
9
  }
11
10
  findIssues(textDocument) {
12
- this.reg.parse();
13
- const file = _lsp_utils_1.LSPUtils.getABAPFile(this.reg, textDocument.uri); // todo, this sould also run for xml files
11
+ const file = this.reg.getFileByName(textDocument.uri);
14
12
  if (file === undefined) {
15
13
  return [];
16
14
  }
@@ -18,6 +16,7 @@ class Diagnostics {
18
16
  if (obj === undefined) {
19
17
  return [];
20
18
  }
19
+ this.reg.parse();
21
20
  let issues = this.reg.findIssuesObject(obj);
22
21
  issues = issues.filter(i => i.getFilename() === file.getFilename());
23
22
  return issues;
@@ -67,7 +67,7 @@ class Registry {
67
67
  }
68
68
  static abaplintVersion() {
69
69
  // magic, see build script "version.sh"
70
- return "2.113.46";
70
+ return "2.113.48";
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.46",
3
+ "version": "2.113.48",
4
4
  "description": "abaplint - Core API",
5
5
  "main": "build/src/index.js",
6
6
  "typings": "build/abaplint.d.ts",