@abaplint/cli 2.113.91 → 2.113.92

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 +28 -14
  2. package/package.json +2 -2
package/build/cli.js CHANGED
@@ -40829,14 +40829,14 @@ const combi_1 = __webpack_require__(/*! ../../abap/2_statements/combi */ "./node
40829
40829
  const cds_integer_1 = __webpack_require__(/*! ./cds_integer */ "./node_modules/@abaplint/core/build/src/cds/expressions/cds_integer.js");
40830
40830
  class CDSArithmetics extends combi_1.Expression {
40831
40831
  getRunnable() {
40832
- const name = (0, combi_1.seq)(_1.CDSName, (0, combi_1.opt)((0, combi_1.seq)(".", _1.CDSName)));
40833
- const val = (0, combi_1.alt)(cds_integer_1.CDSInteger, name, _1.CDSFunction, _1.CDSCase, _1.CDSCast, _1.CDSString);
40832
+ const name = (0, combi_1.seq)(_1.CDSName, (0, combi_1.optPrio)((0, combi_1.seq)(".", _1.CDSName)));
40833
+ const val = (0, combi_1.altPrio)(cds_integer_1.CDSInteger, _1.CDSFunction, _1.CDSCase, _1.CDSCast, _1.CDSString, name);
40834
40834
  const operator = (0, combi_1.altPrio)("+", "-", "*", "/");
40835
40835
  const operatorValue = (0, combi_1.seq)(operator, val);
40836
- const paren = (0, combi_1.seq)("(", val, (0, combi_1.plus)(operatorValue), ")");
40837
- const noParen = (0, combi_1.seq)(val, (0, combi_1.plus)(operatorValue));
40836
+ const paren = (0, combi_1.seq)("(", val, (0, combi_1.plusPrio)(operatorValue), ")");
40837
+ const noParen = (0, combi_1.seq)(val, (0, combi_1.plusPrio)(operatorValue));
40838
40838
  // todo: this is pretty bad, it needs a rewrite
40839
- return (0, combi_1.altPrio)((0, combi_1.seq)(paren, (0, combi_1.plus)(operatorValue)), paren, noParen);
40839
+ return (0, combi_1.altPrio)((0, combi_1.seq)(paren, (0, combi_1.plusPrio)(operatorValue)), paren, noParen);
40840
40840
  }
40841
40841
  }
40842
40842
  exports.CDSArithmetics = CDSArithmetics;
@@ -40926,10 +40926,10 @@ const combi_1 = __webpack_require__(/*! ../../abap/2_statements/combi */ "./node
40926
40926
  class CDSCase extends combi_1.Expression {
40927
40927
  getRunnable() {
40928
40928
  const name = (0, combi_1.seq)(_1.CDSName, (0, combi_1.optPrio)((0, combi_1.seq)(".", _1.CDSName)));
40929
- const value = (0, combi_1.alt)(name, _1.CDSString, _1.CDSFunction, CDSCase, _1.CDSCast, _1.CDSArithmetics);
40930
- const simple = (0, combi_1.seq)("CASE", (0, combi_1.alt)(name, _1.CDSFunction), (0, combi_1.plusPrio)((0, combi_1.seq)("WHEN", value, "THEN", value)), "ELSE", value, "END");
40931
- const complex = (0, combi_1.seq)("CASE", (0, combi_1.plusPrio)((0, combi_1.seq)("WHEN", _1.CDSCondition, "THEN", value)), (0, combi_1.opt)((0, combi_1.seq)("ELSE", value)), "END");
40932
- return (0, combi_1.altPrio)(simple, complex);
40929
+ const value = (0, combi_1.altPrio)(_1.CDSFunction, _1.CDSString, CDSCase, _1.CDSCast, _1.CDSArithmetics, name);
40930
+ const simple = (0, combi_1.seq)((0, combi_1.altPrio)(_1.CDSFunction, name), (0, combi_1.plusPrio)((0, combi_1.seq)("WHEN", value, "THEN", value)), "ELSE", value);
40931
+ const complex = (0, combi_1.seq)((0, combi_1.plusPrio)((0, combi_1.seq)("WHEN", _1.CDSCondition, "THEN", value)), (0, combi_1.optPrio)((0, combi_1.seq)("ELSE", value)));
40932
+ return (0, combi_1.seq)("CASE", (0, combi_1.altPrio)(complex, simple), "END");
40933
40933
  }
40934
40934
  }
40935
40935
  exports.CDSCase = CDSCase;
@@ -40951,8 +40951,8 @@ const _1 = __webpack_require__(/*! . */ "./node_modules/@abaplint/core/build/src
40951
40951
  const combi_1 = __webpack_require__(/*! ../../abap/2_statements/combi */ "./node_modules/@abaplint/core/build/src/abap/2_statements/combi.js");
40952
40952
  class CDSCast extends combi_1.Expression {
40953
40953
  getRunnable() {
40954
- const name = (0, combi_1.seq)(_1.CDSName, (0, combi_1.opt)((0, combi_1.seq)(".", _1.CDSName)));
40955
- 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")), ")");
40954
+ const name = (0, combi_1.seq)(_1.CDSName, (0, combi_1.optPrio)((0, combi_1.seq)(".", _1.CDSName)));
40955
+ return (0, combi_1.seq)("CAST", "(", (0, combi_1.altPrio)(_1.CDSFunction, _1.CDSCase, _1.CDSAggregate, CDSCast, _1.CDSString, _1.CDSArithmetics, name), "AS", _1.CDSType, (0, combi_1.optPrio)((0, combi_1.seq)("PRESERVING", "TYPE")), ")");
40956
40956
  }
40957
40957
  }
40958
40958
  exports.CDSCast = CDSCast;
@@ -44263,11 +44263,25 @@ class Help {
44263
44263
  }
44264
44264
  const obj = reg.findObjectForFile(file);
44265
44265
  if (obj instanceof objects_1.DataDefinition) {
44266
- return "Data definition, dump todo";
44266
+ return this.dumpDDLS(obj, reg);
44267
44267
  }
44268
44268
  return "Unhandled object type: " + obj.getType();
44269
44269
  }
44270
44270
  /////////////////////////////////////////////////
44271
+ static dumpDDLS(obj, reg) {
44272
+ let content = "";
44273
+ content += "<h1>" + obj.getType + " " + obj.getName() + "</h1>\n";
44274
+ content += obj.getDescription() + "\n";
44275
+ content += obj.getParsingIssues().map(i => i.getMessage()).join("<br>\n");
44276
+ content += `<hr>\n`;
44277
+ const parsed = obj.getParsedData();
44278
+ parsed === null || parsed === void 0 ? true : delete parsed.tree;
44279
+ content += `<pre>` + JSON.stringify(parsed, null, 2) + "</pre>\n";
44280
+ content += `<hr>\n`;
44281
+ content += `<pre>` + obj.parseType(reg).toText(0) + "</pre>\n";
44282
+ content += `<hr>\n`;
44283
+ return content;
44284
+ }
44271
44285
  static dumpABAP(file, reg, textDocument, position) {
44272
44286
  let content = "";
44273
44287
  content = `
@@ -53757,7 +53771,7 @@ class Registry {
53757
53771
  }
53758
53772
  static abaplintVersion() {
53759
53773
  // magic, see build script "version.sh"
53760
- return "2.113.91";
53774
+ return "2.113.92";
53761
53775
  }
53762
53776
  getDDICReferences() {
53763
53777
  return this.ddicReferences;
@@ -63239,7 +63253,7 @@ DATA lt_bar TYPE STANDARD TABLE OF ty.`,
63239
63253
  runParsed(file) {
63240
63254
  const issues = [];
63241
63255
  for (const statement of file.getStatements()) {
63242
- if (!(statement.get() instanceof Statements.Data)) {
63256
+ if (!(statement.get() instanceof Statements.Data || statement.get() instanceof Statements.Type)) {
63243
63257
  continue;
63244
63258
  }
63245
63259
  const tt = statement.findFirstExpression(Expressions.TypeTable);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/cli",
3
- "version": "2.113.91",
3
+ "version": "2.113.92",
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.91",
41
+ "@abaplint/core": "^2.113.92",
42
42
  "@types/chai": "^4.3.20",
43
43
  "@types/glob": "^8.1.0",
44
44
  "@types/minimist": "^1.2.5",