@abaplint/cli 2.113.91 → 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.
- package/build/cli.js +40 -16
- 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.
|
|
40833
|
-
const val = (0, combi_1.
|
|
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.
|
|
40837
|
-
const noParen = (0, combi_1.seq)(val, (0, combi_1.
|
|
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.
|
|
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.
|
|
40930
|
-
const simple = (0, combi_1.seq)(
|
|
40931
|
-
const complex = (0, combi_1.seq)(
|
|
40932
|
-
return (0, combi_1.altPrio)(simple,
|
|
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.
|
|
40955
|
-
return (0, combi_1.seq)("CAST", "(", (0, combi_1.
|
|
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;
|
|
@@ -41001,7 +41001,7 @@ class CDSCondition extends combi_1.Expression {
|
|
|
41001
41001
|
const name = (0, combi_1.seq)(_1.CDSName, (0, combi_1.optPrio)((0, combi_1.seq)(".", (0, combi_1.altPrio)(_1.CDSString, _1.CDSName))));
|
|
41002
41002
|
const left = (0, combi_1.altPrio)(_1.CDSString, _1.CDSFunction, name);
|
|
41003
41003
|
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");
|
|
41004
|
-
const compare = (0, combi_1.seq)(left, operators, (0, combi_1.
|
|
41004
|
+
const compare = (0, combi_1.seq)(left, operators, (0, combi_1.altPrio)(left, cds_integer_1.CDSInteger));
|
|
41005
41005
|
const is = (0, combi_1.seq)(left, "IS", (0, combi_1.optPrio)("NOT"), (0, combi_1.altPrio)("INITIAL", "NULL"));
|
|
41006
41006
|
const condition = (0, combi_1.seq)((0, combi_1.optPrio)("NOT"), (0, combi_1.altPrio)(compare, is));
|
|
41007
41007
|
const paren = (0, combi_1.seq)("(", CDSCondition, ")");
|
|
@@ -41345,7 +41345,7 @@ const combi_1 = __webpack_require__(/*! ../../abap/2_statements/combi */ "./node
|
|
|
41345
41345
|
class CDSName extends combi_1.Expression {
|
|
41346
41346
|
getRunnable() {
|
|
41347
41347
|
const pre = (0, combi_1.seq)("/", (0, combi_1.regex)(/^[\w_]+$/), "/");
|
|
41348
|
-
return (0, combi_1.seq)((0, combi_1.
|
|
41348
|
+
return (0, combi_1.seq)((0, combi_1.optPrio)(":"), (0, combi_1.optPrio)(pre), (0, combi_1.regex)(/^\$?#?[\w_]+$/));
|
|
41349
41349
|
}
|
|
41350
41350
|
}
|
|
41351
41351
|
exports.CDSName = CDSName;
|
|
@@ -44251,6 +44251,7 @@ const _abap_object_1 = __webpack_require__(/*! ../objects/_abap_object */ "./nod
|
|
|
44251
44251
|
const dump_scope_1 = __webpack_require__(/*! ./dump_scope */ "./node_modules/@abaplint/core/build/src/lsp/dump_scope.js");
|
|
44252
44252
|
const virtual_position_1 = __webpack_require__(/*! ../virtual_position */ "./node_modules/@abaplint/core/build/src/virtual_position.js");
|
|
44253
44253
|
const objects_1 = __webpack_require__(/*! ../objects */ "./node_modules/@abaplint/core/build/src/objects/index.js");
|
|
44254
|
+
const cds_lexer_1 = __webpack_require__(/*! ../cds/cds_lexer */ "./node_modules/@abaplint/core/build/src/cds/cds_lexer.js");
|
|
44254
44255
|
class Help {
|
|
44255
44256
|
static find(reg, textDocument, position) {
|
|
44256
44257
|
const abapFile = _lsp_utils_1.LSPUtils.getABAPFile(reg, textDocument.uri);
|
|
@@ -44263,11 +44264,34 @@ class Help {
|
|
|
44263
44264
|
}
|
|
44264
44265
|
const obj = reg.findObjectForFile(file);
|
|
44265
44266
|
if (obj instanceof objects_1.DataDefinition) {
|
|
44266
|
-
return
|
|
44267
|
+
return this.dumpDDLS(obj, reg);
|
|
44267
44268
|
}
|
|
44268
44269
|
return "Unhandled object type: " + obj.getType();
|
|
44269
44270
|
}
|
|
44270
44271
|
/////////////////////////////////////////////////
|
|
44272
|
+
static dumpDDLS(obj, reg) {
|
|
44273
|
+
let content = "";
|
|
44274
|
+
content += "<h1>" + obj.getType() + " " + obj.getName() + "</h1>\n";
|
|
44275
|
+
content += obj.getDescription() + "\n";
|
|
44276
|
+
content += obj.getParsingIssues().map(i => i.getMessage()).join("<br>\n");
|
|
44277
|
+
content += `<hr>\n`;
|
|
44278
|
+
const parsed = obj.getParsedData();
|
|
44279
|
+
parsed === null || parsed === void 0 ? true : delete parsed.tree;
|
|
44280
|
+
content += `<pre>` + JSON.stringify(parsed, null, 2) + "</pre>\n";
|
|
44281
|
+
content += `<hr>\n`;
|
|
44282
|
+
content += `<pre>` + obj.parseType(reg).toText(0) + "</pre>\n";
|
|
44283
|
+
content += `<hr>\n`;
|
|
44284
|
+
const file = obj.findSourceFile();
|
|
44285
|
+
if (file) {
|
|
44286
|
+
const tokens = cds_lexer_1.CDSLexer.run(file);
|
|
44287
|
+
content += `<h3>Tokens</h3>\n<pre>\n`;
|
|
44288
|
+
for (const t of tokens) {
|
|
44289
|
+
content += JSON.stringify(t) + "\n";
|
|
44290
|
+
}
|
|
44291
|
+
content += `</pre>\n`;
|
|
44292
|
+
}
|
|
44293
|
+
return content;
|
|
44294
|
+
}
|
|
44271
44295
|
static dumpABAP(file, reg, textDocument, position) {
|
|
44272
44296
|
let content = "";
|
|
44273
44297
|
content = `
|
|
@@ -53757,7 +53781,7 @@ class Registry {
|
|
|
53757
53781
|
}
|
|
53758
53782
|
static abaplintVersion() {
|
|
53759
53783
|
// magic, see build script "version.sh"
|
|
53760
|
-
return "2.113.
|
|
53784
|
+
return "2.113.93";
|
|
53761
53785
|
}
|
|
53762
53786
|
getDDICReferences() {
|
|
53763
53787
|
return this.ddicReferences;
|
|
@@ -63239,7 +63263,7 @@ DATA lt_bar TYPE STANDARD TABLE OF ty.`,
|
|
|
63239
63263
|
runParsed(file) {
|
|
63240
63264
|
const issues = [];
|
|
63241
63265
|
for (const statement of file.getStatements()) {
|
|
63242
|
-
if (!(statement.get() instanceof Statements.Data)) {
|
|
63266
|
+
if (!(statement.get() instanceof Statements.Data || statement.get() instanceof Statements.Type)) {
|
|
63243
63267
|
continue;
|
|
63244
63268
|
}
|
|
63245
63269
|
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.
|
|
3
|
+
"version": "2.113.93",
|
|
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.
|
|
41
|
+
"@abaplint/core": "^2.113.93",
|
|
42
42
|
"@types/chai": "^4.3.20",
|
|
43
43
|
"@types/glob": "^8.1.0",
|
|
44
44
|
"@types/minimist": "^1.2.5",
|