@abaplint/cli 2.113.39 → 2.113.40

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 +41 -10
  2. package/package.json +3 -3
package/build/cli.js CHANGED
@@ -11586,7 +11586,8 @@ const expressions_1 = __webpack_require__(/*! ../expressions */ "./node_modules/
11586
11586
  class DataBegin {
11587
11587
  getMatcher() {
11588
11588
  const occurs = (0, combi_1.seq)("OCCURS", expressions_1.Integer);
11589
- const structure = (0, combi_1.seq)("BEGIN OF", (0, combi_1.opt)("COMMON PART"), expressions_1.DefinitionName, (0, combi_1.opt)("READ-ONLY"), (0, combi_1.opt)(occurs));
11589
+ const common = (0, combi_1.altPrio)((0, combi_1.seq)("COMMON PART", expressions_1.DefinitionName), "COMMON PART");
11590
+ const structure = (0, combi_1.seq)("BEGIN OF", (0, combi_1.altPrio)(common, (0, combi_1.seq)(expressions_1.DefinitionName, (0, combi_1.opt)("READ-ONLY"), (0, combi_1.opt)(occurs))));
11590
11591
  return (0, combi_1.seq)("DATA", structure);
11591
11592
  }
11592
11593
  }
@@ -35334,6 +35335,7 @@ const Expressions = __webpack_require__(/*! ../2_statements/expressions */ "./no
35334
35335
  const flow_graph_1 = __webpack_require__(/*! ./flow_graph */ "./node_modules/@abaplint/core/build/src/abap/flow/flow_graph.js");
35335
35336
  const objects_1 = __webpack_require__(/*! ../../objects */ "./node_modules/@abaplint/core/build/src/objects/index.js");
35336
35337
  const selection_events_1 = __webpack_require__(/*! ./selection_events */ "./node_modules/@abaplint/core/build/src/abap/flow/selection_events.js");
35338
+ const virtual_position_1 = __webpack_require__(/*! ../../virtual_position */ "./node_modules/@abaplint/core/build/src/virtual_position.js");
35337
35339
  class StatementFlow {
35338
35340
  constructor() {
35339
35341
  this.counter = 0;
@@ -35422,6 +35424,7 @@ class StatementFlow {
35422
35424
  var _a;
35423
35425
  return ((_a = f.findDirectStructure(Structures.Body)) === null || _a === void 0 ? void 0 : _a.getChildren()) || [];
35424
35426
  }
35427
+ // note: it must handle macros and chained statements
35425
35428
  buildName(statement) {
35426
35429
  let token = undefined;
35427
35430
  const colon = statement.getColon();
@@ -35436,12 +35439,18 @@ class StatementFlow {
35436
35439
  }
35437
35440
  }
35438
35441
  }
35442
+ let extra = "";
35443
+ const tStart = token === null || token === void 0 ? void 0 : token.getStart();
35444
+ if (tStart instanceof virtual_position_1.VirtualPosition) {
35445
+ extra += "$" + tStart.vrow;
35446
+ extra += "," + tStart.vcol;
35447
+ }
35439
35448
  if (token === undefined) {
35440
35449
  return "tokenError";
35441
35450
  }
35442
35451
  return statement.get().constructor.name +
35443
35452
  ":" + token.getRow() +
35444
- "," + token.getCol();
35453
+ "," + token.getCol() + extra;
35445
35454
  }
35446
35455
  traverseBody(children, context) {
35447
35456
  const graph = new flow_graph_1.FlowGraph(this.counter++);
@@ -39743,9 +39752,19 @@ class CDSDetermineTypes {
39743
39752
  const components = [];
39744
39753
  for (const f of (parsedData === null || parsedData === void 0 ? void 0 : parsedData.fields) || []) {
39745
39754
  if (f.prefix !== "") {
39746
- let source = parsedData.sources.find((s) => { var _a; return ((_a = s.as) === null || _a === void 0 ? void 0 : _a.toUpperCase()) === f.prefix.toUpperCase(); });
39755
+ const prefixUpper = f.prefix.toUpperCase();
39756
+ let source = parsedData.sources.find((s) => { var _a; return ((_a = s.as) === null || _a === void 0 ? void 0 : _a.toUpperCase()) === prefixUpper; });
39747
39757
  if ((source === null || source === void 0 ? void 0 : source.name) === undefined) {
39748
- source = parsedData.sources.find((s) => s.name.toUpperCase() === f.prefix.toUpperCase());
39758
+ source = parsedData.sources.find((s) => s.name.toUpperCase() === prefixUpper);
39759
+ }
39760
+ if ((source === null || source === void 0 ? void 0 : source.name) === undefined
39761
+ && (parsedData.associations.find((s) => s.name.toUpperCase() === prefixUpper)
39762
+ || parsedData.associations.find((s) => { var _a; return ((_a = s.as) === null || _a === void 0 ? void 0 : _a.toUpperCase()) === prefixUpper; }))) {
39763
+ components.push({
39764
+ name: f.name,
39765
+ type: new basic_1.VoidType("DDLS:association"),
39766
+ });
39767
+ continue;
39749
39768
  }
39750
39769
  if ((source === null || source === void 0 ? void 0 : source.name) === undefined) {
39751
39770
  components.push({
@@ -40302,7 +40321,7 @@ const combi_1 = __webpack_require__(/*! ../../abap/2_statements/combi */ "./node
40302
40321
  class CDSCast extends combi_1.Expression {
40303
40322
  getRunnable() {
40304
40323
  const name = (0, combi_1.seq)(_1.CDSName, (0, combi_1.opt)((0, combi_1.seq)(".", _1.CDSName)));
40305
- return (0, combi_1.seq)("CAST", "(", (0, combi_1.alt)(name, _1.CDSFunction, _1.CDSCase, CDSCast, _1.CDSString, _1.CDSArithmetics), "AS", _1.CDSType, (0, combi_1.opt)((0, combi_1.seq)("PRESERVING", "TYPE")), ")");
40324
+ return (0, combi_1.seq)("CAST", "(", (0, combi_1.alt)(name, _1.CDSFunction, _1.CDSCase, _1.CDSAggregate, CDSCast, _1.CDSString, _1.CDSArithmetics), "AS", _1.CDSType, (0, combi_1.opt)((0, combi_1.seq)("PRESERVING", "TYPE")), ")");
40306
40325
  }
40307
40326
  }
40308
40327
  exports.CDSCast = CDSCast;
@@ -43569,6 +43588,7 @@ const _lsp_utils_1 = __webpack_require__(/*! ./_lsp_utils */ "./node_modules/@ab
43569
43588
  const syntax_1 = __webpack_require__(/*! ../abap/5_syntax/syntax */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/syntax.js");
43570
43589
  const _abap_object_1 = __webpack_require__(/*! ../objects/_abap_object */ "./node_modules/@abaplint/core/build/src/objects/_abap_object.js");
43571
43590
  const dump_scope_1 = __webpack_require__(/*! ./dump_scope */ "./node_modules/@abaplint/core/build/src/lsp/dump_scope.js");
43591
+ const virtual_position_1 = __webpack_require__(/*! ../virtual_position */ "./node_modules/@abaplint/core/build/src/virtual_position.js");
43572
43592
  class Help {
43573
43593
  static find(reg, textDocument, position) {
43574
43594
  const file = _lsp_utils_1.LSPUtils.getABAPFile(reg, textDocument.uri);
@@ -43743,13 +43763,24 @@ class Help {
43743
43763
  return ret + "</ul>";
43744
43764
  }
43745
43765
  static tokens(file) {
43746
- let inner = "<table><tr><td><b>String</b></td><td><b>Type</b></td><td><b>Row</b></td><td><b>Column</b></td></tr>";
43766
+ let inner = `<table><tr><td><b>String</b></td><td><b>Type</b></td>
43767
+ <td><b>Row</b></td><td><b>Column</b></td>
43768
+ <td><b>vRow</b></td><td><b>vColumn</b></td>
43769
+ </tr>`;
43747
43770
  for (const token of file.getTokens()) {
43748
- inner = inner + "<tr><td><tt>" +
43771
+ const tStart = token.getStart();
43772
+ inner += "<tr><td><tt>" +
43749
43773
  this.escape(token.getStr()) + "</tt></td><td>" +
43750
43774
  token.constructor.name + "</td><td align=\"right\">" +
43751
- token.getRow() + "</td><td align=\"right\">" +
43752
- token.getCol() + "</td></tr>";
43775
+ tStart.getRow() + "</td><td align=\"right\">" +
43776
+ tStart.getCol() + "</td>";
43777
+ if (tStart instanceof virtual_position_1.VirtualPosition) {
43778
+ inner += `<td>${tStart.vcol}</td><td>${tStart.vrow}</td>`;
43779
+ }
43780
+ else {
43781
+ inner += "<td></td><td></td>";
43782
+ }
43783
+ inner += "</tr>";
43753
43784
  }
43754
43785
  inner = inner + "</table>";
43755
43786
  return inner;
@@ -52974,7 +53005,7 @@ class Registry {
52974
53005
  }
52975
53006
  static abaplintVersion() {
52976
53007
  // magic, see build script "version.sh"
52977
- return "2.113.39";
53008
+ return "2.113.40";
52978
53009
  }
52979
53010
  getDDICReferences() {
52980
53011
  return this.ddicReferences;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/cli",
3
- "version": "2.113.39",
3
+ "version": "2.113.40",
4
4
  "description": "abaplint - Command Line Interface",
5
5
  "funding": "https://github.com/sponsors/larshp",
6
6
  "bin": {
@@ -38,12 +38,12 @@
38
38
  },
39
39
  "homepage": "https://abaplint.org",
40
40
  "devDependencies": {
41
- "@abaplint/core": "^2.113.39",
41
+ "@abaplint/core": "^2.113.40",
42
42
  "@types/chai": "^4.3.20",
43
43
  "@types/glob": "^8.1.0",
44
44
  "@types/minimist": "^1.2.5",
45
45
  "@types/mocha": "^10.0.9",
46
- "@types/node": "^22.8.7",
46
+ "@types/node": "^22.9.0",
47
47
  "@types/progress": "^2.0.7",
48
48
  "chai": "^4.5.0",
49
49
  "chalk": "^5.3.0",