@abaplint/cli 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.
Files changed (2) hide show
  1. package/build/cli.js +11 -9
  2. package/package.json +2 -2
package/build/cli.js CHANGED
@@ -5130,7 +5130,7 @@ class Field extends combi_1.Expression {
5130
5130
  getRunnable() {
5131
5131
  // "&1" can be used for almost anything(field names, method names etc.) in macros
5132
5132
  // field names with only digits should not be possible
5133
- return (0, combi_1.regex)(/^[&_!]?\*?\w*(\/\w+\/)?\d*[a-zA-Z_%\$][\w\*%\$\?#]*(~\w+)?$/);
5133
+ return (0, combi_1.regex)(/^[&_!?]?\*?\w*(\/\w+\/)?\d*[a-zA-Z_%\$][\w\*%\$\?#]*(~\w+)?$/);
5134
5134
  }
5135
5135
  }
5136
5136
  exports.Field = Field;
@@ -5255,7 +5255,7 @@ const tokens_1 = __webpack_require__(/*! ../../1_lexer/tokens */ "./node_modules
5255
5255
  const _1 = __webpack_require__(/*! . */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js");
5256
5256
  class FieldOffset extends combi_1.Expression {
5257
5257
  getRunnable() {
5258
- const offset = (0, combi_1.seq)((0, combi_1.tok)(tokens_1.Plus), (0, combi_1.altPrio)((0, combi_1.regex)(/^\d+$/), _1.SimpleFieldChain2));
5258
+ 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)));
5259
5259
  return offset;
5260
5260
  }
5261
5261
  }
@@ -10387,7 +10387,8 @@ const version_1 = __webpack_require__(/*! ../../../version */ "./node_modules/@a
10387
10387
  class Break {
10388
10388
  getMatcher() {
10389
10389
  const next = (0, combi_1.str)("AT NEXT APPLICATION STATEMENT");
10390
- 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));
10390
+ // note BREAK is a special macro that wraps the parameter in a char
10391
+ 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)(/.*/))));
10391
10392
  return (0, combi_1.verNot)(version_1.Version.Cloud, ret);
10392
10393
  }
10393
10394
  }
@@ -15696,7 +15697,7 @@ class ReadTable {
15696
15697
  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)));
15697
15698
  const using = (0, combi_1.seq)("USING KEY", (0, combi_1.alt)(expressions_1.Field, expressions_1.Dynamic));
15698
15699
  const from = (0, combi_1.seq)("FROM", expressions_1.Source);
15699
- 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");
15700
+ 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");
15700
15701
  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));
15701
15702
  }
15702
15703
  }
@@ -23054,9 +23055,11 @@ class TypeUtils {
23054
23055
  && this.isCharLike(source)) {
23055
23056
  return true;
23056
23057
  }
23058
+ else if (source instanceof basic_1.StructureType) {
23059
+ return this.isCharLikeStrict(source);
23060
+ }
23057
23061
  else if (source instanceof basic_1.DataReference
23058
23062
  || source instanceof basic_1.ObjectReferenceType
23059
- || source instanceof basic_1.StructureType
23060
23063
  || source instanceof basic_1.GenericObjectReferenceType) {
23061
23064
  return false;
23062
23065
  }
@@ -43467,15 +43470,13 @@ exports.Definition = Definition;
43467
43470
  Object.defineProperty(exports, "__esModule", ({ value: true }));
43468
43471
  exports.Diagnostics = void 0;
43469
43472
  const LServer = __webpack_require__(/*! vscode-languageserver-types */ "./node_modules/vscode-languageserver-types/lib/umd/main.js");
43470
- const _lsp_utils_1 = __webpack_require__(/*! ./_lsp_utils */ "./node_modules/@abaplint/core/build/src/lsp/_lsp_utils.js");
43471
43473
  const severity_1 = __webpack_require__(/*! ../severity */ "./node_modules/@abaplint/core/build/src/severity.js");
43472
43474
  class Diagnostics {
43473
43475
  constructor(reg) {
43474
43476
  this.reg = reg;
43475
43477
  }
43476
43478
  findIssues(textDocument) {
43477
- this.reg.parse();
43478
- const file = _lsp_utils_1.LSPUtils.getABAPFile(this.reg, textDocument.uri); // todo, this sould also run for xml files
43479
+ const file = this.reg.getFileByName(textDocument.uri);
43479
43480
  if (file === undefined) {
43480
43481
  return [];
43481
43482
  }
@@ -43483,6 +43484,7 @@ class Diagnostics {
43483
43484
  if (obj === undefined) {
43484
43485
  return [];
43485
43486
  }
43487
+ this.reg.parse();
43486
43488
  let issues = this.reg.findIssuesObject(obj);
43487
43489
  issues = issues.filter(i => i.getFilename() === file.getFilename());
43488
43490
  return issues;
@@ -53075,7 +53077,7 @@ class Registry {
53075
53077
  }
53076
53078
  static abaplintVersion() {
53077
53079
  // magic, see build script "version.sh"
53078
- return "2.113.46";
53080
+ return "2.113.48";
53079
53081
  }
53080
53082
  getDDICReferences() {
53081
53083
  return this.ddicReferences;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/cli",
3
- "version": "2.113.46",
3
+ "version": "2.113.48",
4
4
  "description": "abaplint - Command Line Interface",
5
5
  "funding": "https://github.com/sponsors/larshp",
6
6
  "bin": {
@@ -38,7 +38,7 @@
38
38
  },
39
39
  "homepage": "https://abaplint.org",
40
40
  "devDependencies": {
41
- "@abaplint/core": "^2.113.46",
41
+ "@abaplint/core": "^2.113.48",
42
42
  "@types/chai": "^4.3.20",
43
43
  "@types/glob": "^8.1.0",
44
44
  "@types/minimist": "^1.2.5",