@abaplint/cli 2.113.38 → 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.
- package/build/cli.js +43 -11
- 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
|
|
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++);
|
|
@@ -35550,6 +35559,7 @@ class StatementFlow {
|
|
|
35550
35559
|
}
|
|
35551
35560
|
else if (type instanceof Structures.Data
|
|
35552
35561
|
|| type instanceof Structures.Constants
|
|
35562
|
+
|| type instanceof Structures.Statics
|
|
35553
35563
|
|| type instanceof Structures.Types) {
|
|
35554
35564
|
// these doesnt affect control flow, so just take the first statement
|
|
35555
35565
|
const statement = n.getFirstStatement();
|
|
@@ -39742,9 +39752,19 @@ class CDSDetermineTypes {
|
|
|
39742
39752
|
const components = [];
|
|
39743
39753
|
for (const f of (parsedData === null || parsedData === void 0 ? void 0 : parsedData.fields) || []) {
|
|
39744
39754
|
if (f.prefix !== "") {
|
|
39745
|
-
|
|
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; });
|
|
39746
39757
|
if ((source === null || source === void 0 ? void 0 : source.name) === undefined) {
|
|
39747
|
-
source = parsedData.sources.find((s) => s.name.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;
|
|
39748
39768
|
}
|
|
39749
39769
|
if ((source === null || source === void 0 ? void 0 : source.name) === undefined) {
|
|
39750
39770
|
components.push({
|
|
@@ -40301,7 +40321,7 @@ const combi_1 = __webpack_require__(/*! ../../abap/2_statements/combi */ "./node
|
|
|
40301
40321
|
class CDSCast extends combi_1.Expression {
|
|
40302
40322
|
getRunnable() {
|
|
40303
40323
|
const name = (0, combi_1.seq)(_1.CDSName, (0, combi_1.opt)((0, combi_1.seq)(".", _1.CDSName)));
|
|
40304
|
-
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")), ")");
|
|
40305
40325
|
}
|
|
40306
40326
|
}
|
|
40307
40327
|
exports.CDSCast = CDSCast;
|
|
@@ -40351,7 +40371,7 @@ class CDSCondition extends combi_1.Expression {
|
|
|
40351
40371
|
const left = (0, combi_1.alt)(name, _1.CDSFunction, _1.CDSString);
|
|
40352
40372
|
const compare = (0, combi_1.seq)(left, (0, combi_1.alt)("=", (0, combi_1.seq)("!", "="), (0, combi_1.seq)("<", ">"), "<", ">", (0, combi_1.seq)(">", "="), (0, combi_1.seq)("<", "="), "LIKE", "NOT LIKE"), (0, combi_1.alt)(left, cds_integer_1.CDSInteger, _1.CDSFunction, _1.CDSString));
|
|
40353
40373
|
const is = (0, combi_1.seq)(left, "IS", (0, combi_1.optPrio)("NOT"), (0, combi_1.altPrio)("INITIAL", "NULL"));
|
|
40354
|
-
const condition = (0, combi_1.alt)(compare, is);
|
|
40374
|
+
const condition = (0, combi_1.seq)((0, combi_1.optPrio)("NOT"), (0, combi_1.alt)(compare, is));
|
|
40355
40375
|
const paren = (0, combi_1.seq)("(", CDSCondition, ")");
|
|
40356
40376
|
return (0, combi_1.seq)((0, combi_1.alt)(condition, paren), (0, combi_1.star)((0, combi_1.seq)((0, combi_1.alt)("AND", "OR"), (0, combi_1.alt)(condition, paren))));
|
|
40357
40377
|
}
|
|
@@ -43568,6 +43588,7 @@ const _lsp_utils_1 = __webpack_require__(/*! ./_lsp_utils */ "./node_modules/@ab
|
|
|
43568
43588
|
const syntax_1 = __webpack_require__(/*! ../abap/5_syntax/syntax */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/syntax.js");
|
|
43569
43589
|
const _abap_object_1 = __webpack_require__(/*! ../objects/_abap_object */ "./node_modules/@abaplint/core/build/src/objects/_abap_object.js");
|
|
43570
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");
|
|
43571
43592
|
class Help {
|
|
43572
43593
|
static find(reg, textDocument, position) {
|
|
43573
43594
|
const file = _lsp_utils_1.LSPUtils.getABAPFile(reg, textDocument.uri);
|
|
@@ -43742,13 +43763,24 @@ class Help {
|
|
|
43742
43763
|
return ret + "</ul>";
|
|
43743
43764
|
}
|
|
43744
43765
|
static tokens(file) {
|
|
43745
|
-
let inner =
|
|
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>`;
|
|
43746
43770
|
for (const token of file.getTokens()) {
|
|
43747
|
-
|
|
43771
|
+
const tStart = token.getStart();
|
|
43772
|
+
inner += "<tr><td><tt>" +
|
|
43748
43773
|
this.escape(token.getStr()) + "</tt></td><td>" +
|
|
43749
43774
|
token.constructor.name + "</td><td align=\"right\">" +
|
|
43750
|
-
|
|
43751
|
-
|
|
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>";
|
|
43752
43784
|
}
|
|
43753
43785
|
inner = inner + "</table>";
|
|
43754
43786
|
return inner;
|
|
@@ -52973,7 +53005,7 @@ class Registry {
|
|
|
52973
53005
|
}
|
|
52974
53006
|
static abaplintVersion() {
|
|
52975
53007
|
// magic, see build script "version.sh"
|
|
52976
|
-
return "2.113.
|
|
53008
|
+
return "2.113.40";
|
|
52977
53009
|
}
|
|
52978
53010
|
getDDICReferences() {
|
|
52979
53011
|
return this.ddicReferences;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abaplint/cli",
|
|
3
|
-
"version": "2.113.
|
|
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.
|
|
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.
|
|
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",
|