@abaplint/cli 2.99.8 → 2.99.10
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 +37 -20
- package/package.json +5 -5
package/build/cli.js
CHANGED
|
@@ -8793,6 +8793,7 @@ class StatementParser {
|
|
|
8793
8793
|
const concat = statement.concatTokens().toUpperCase();
|
|
8794
8794
|
if (concat.startsWith("CALL METHOD ") === false
|
|
8795
8795
|
&& concat.startsWith("RAISE EXCEPTION TYPE ") === false
|
|
8796
|
+
&& concat.startsWith("READ TABLE ") === false
|
|
8796
8797
|
&& concat.startsWith("LOOP AT ") === false
|
|
8797
8798
|
&& concat.startsWith("CALL FUNCTION ") === false) {
|
|
8798
8799
|
for (const { first, second } of this.buildSplits(statement.getTokens())) {
|
|
@@ -30718,7 +30719,7 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
|
30718
30719
|
exports.Tables = void 0;
|
|
30719
30720
|
const Expressions = __webpack_require__(/*! ../../2_statements/expressions */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js");
|
|
30720
30721
|
const _typed_identifier_1 = __webpack_require__(/*! ../../types/_typed_identifier */ "./node_modules/@abaplint/core/build/src/abap/types/_typed_identifier.js");
|
|
30721
|
-
const
|
|
30722
|
+
const unknown_type_1 = __webpack_require__(/*! ../../types/basic/unknown_type */ "./node_modules/@abaplint/core/build/src/abap/types/basic/unknown_type.js");
|
|
30722
30723
|
class Tables {
|
|
30723
30724
|
runSyntax(node, scope, filename) {
|
|
30724
30725
|
var _a, _b;
|
|
@@ -30730,13 +30731,15 @@ class Tables {
|
|
|
30730
30731
|
if (name.startsWith("*")) {
|
|
30731
30732
|
name = name.substr(1);
|
|
30732
30733
|
}
|
|
30734
|
+
// lookupTableOrView will also give Unknown and Void
|
|
30733
30735
|
const found = (_b = scope.getDDIC()) === null || _b === void 0 ? void 0 : _b.lookupTableOrView(name);
|
|
30734
30736
|
if (found) {
|
|
30735
30737
|
scope.getDDICReferences().addUsing(scope.getParentObj(), { object: found.object, filename: filename, token: nameToken });
|
|
30736
30738
|
scope.addIdentifier(new _typed_identifier_1.TypedIdentifier(nameToken, filename, found.type));
|
|
30737
30739
|
return;
|
|
30738
30740
|
}
|
|
30739
|
-
|
|
30741
|
+
// this should never happen,
|
|
30742
|
+
scope.addIdentifier(new _typed_identifier_1.TypedIdentifier(nameToken, filename, new unknown_type_1.UnknownType("Tables, fallback")));
|
|
30740
30743
|
}
|
|
30741
30744
|
}
|
|
30742
30745
|
exports.Tables = Tables;
|
|
@@ -39381,21 +39384,27 @@ class LSPLookup {
|
|
|
39381
39384
|
const hover = "Method Definition \"" + method.getName() + "\"";
|
|
39382
39385
|
return { hover, definition: found, definitionId: method, scope: bottomScope };
|
|
39383
39386
|
}
|
|
39387
|
+
let hoverValue = "";
|
|
39388
|
+
const ddicRefs = reg.getDDICReferences().listByFilename(cursor.identifier.getFilename(), cursor.identifier.getStart().getRow());
|
|
39389
|
+
for (const d of ddicRefs) {
|
|
39390
|
+
if (d.object && d.token && d.token.getStart().equals(cursor.identifier.getStart())) {
|
|
39391
|
+
hoverValue += `DDIC: ${d.object.getType()} ${d.object.getName()}`;
|
|
39392
|
+
}
|
|
39393
|
+
}
|
|
39384
39394
|
const variable = bottomScope.findVariable(cursor.token.getStr());
|
|
39385
39395
|
if (variable !== undefined && variable.getStart().equals(cursor.token.getStart())) {
|
|
39386
39396
|
const hover = "Variable Definition\n\n" + this.dumpType(variable);
|
|
39397
|
+
if (hoverValue !== "") {
|
|
39398
|
+
hoverValue = hover + "\n_________________\n" + hoverValue;
|
|
39399
|
+
}
|
|
39400
|
+
else {
|
|
39401
|
+
hoverValue = hover;
|
|
39402
|
+
}
|
|
39387
39403
|
let location = undefined;
|
|
39388
39404
|
if (variable.getMeta().includes("built-in" /* IdentifierMeta.BuiltIn */) === false) {
|
|
39389
39405
|
location = _lsp_utils_1.LSPUtils.identiferToLocation(variable);
|
|
39390
39406
|
}
|
|
39391
|
-
return { hover, definition: location, implementation: location, definitionId: variable, scope: bottomScope };
|
|
39392
|
-
}
|
|
39393
|
-
let hoverValue = "";
|
|
39394
|
-
const ddicRefs = reg.getDDICReferences().listByFilename(cursor.identifier.getFilename(), cursor.identifier.getStart().getRow());
|
|
39395
|
-
for (const d of ddicRefs) {
|
|
39396
|
-
if (d.object && d.token && d.token.getStart().equals(cursor.identifier.getStart())) {
|
|
39397
|
-
hoverValue += `DDIC: ${d.object.getType()} ${d.object.getName()}`;
|
|
39398
|
-
}
|
|
39407
|
+
return { hover: hoverValue, definition: location, implementation: location, definitionId: variable, scope: bottomScope };
|
|
39399
39408
|
}
|
|
39400
39409
|
const refs = this.searchReferences(bottomScope, cursor.token);
|
|
39401
39410
|
if (refs.length > 0) {
|
|
@@ -44983,10 +44992,6 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
|
44983
44992
|
exports.Program = void 0;
|
|
44984
44993
|
const _abap_object_1 = __webpack_require__(/*! ./_abap_object */ "./node_modules/@abaplint/core/build/src/objects/_abap_object.js");
|
|
44985
44994
|
class Program extends _abap_object_1.ABAPObject {
|
|
44986
|
-
constructor() {
|
|
44987
|
-
super(...arguments);
|
|
44988
|
-
this.isIncludeValue = undefined;
|
|
44989
|
-
}
|
|
44990
44995
|
getType() {
|
|
44991
44996
|
return "PROG";
|
|
44992
44997
|
}
|
|
@@ -45008,15 +45013,25 @@ class Program extends _abap_object_1.ABAPObject {
|
|
|
45008
45013
|
};
|
|
45009
45014
|
}
|
|
45010
45015
|
setDirty() {
|
|
45011
|
-
this.
|
|
45016
|
+
this.parsedXML = undefined;
|
|
45012
45017
|
super.setDirty();
|
|
45013
45018
|
}
|
|
45014
45019
|
isInclude() {
|
|
45015
|
-
|
|
45020
|
+
this.parseXML();
|
|
45021
|
+
return this.parsedXML.isInclude;
|
|
45022
|
+
}
|
|
45023
|
+
isModulePool() {
|
|
45024
|
+
this.parseXML();
|
|
45025
|
+
return this.parsedXML.isModulePool;
|
|
45026
|
+
}
|
|
45027
|
+
parseXML() {
|
|
45028
|
+
if (this.parsedXML === undefined) {
|
|
45016
45029
|
const file = this.getXMLFile();
|
|
45017
|
-
this.
|
|
45030
|
+
this.parsedXML = {
|
|
45031
|
+
isInclude: file ? file.getRaw().includes("<SUBC>I</SUBC>") : false,
|
|
45032
|
+
isModulePool: file ? file.getRaw().includes("<SUBC>M</SUBC>") : false,
|
|
45033
|
+
};
|
|
45018
45034
|
}
|
|
45019
|
-
return this.isIncludeValue;
|
|
45020
45035
|
}
|
|
45021
45036
|
}
|
|
45022
45037
|
exports.Program = Program;
|
|
@@ -47591,7 +47606,7 @@ class Registry {
|
|
|
47591
47606
|
}
|
|
47592
47607
|
static abaplintVersion() {
|
|
47593
47608
|
// magic, see build script "version.sh"
|
|
47594
|
-
return "2.99.
|
|
47609
|
+
return "2.99.10";
|
|
47595
47610
|
}
|
|
47596
47611
|
getDDICReferences() {
|
|
47597
47612
|
return this.references;
|
|
@@ -58904,7 +58919,9 @@ class MainFileContents {
|
|
|
58904
58919
|
if (stru === undefined) {
|
|
58905
58920
|
return [];
|
|
58906
58921
|
}
|
|
58907
|
-
if (obj instanceof Objects.Program
|
|
58922
|
+
if (obj instanceof Objects.Program
|
|
58923
|
+
&& obj.isInclude() === false
|
|
58924
|
+
&& obj.isModulePool() === false) {
|
|
58908
58925
|
let count = 0;
|
|
58909
58926
|
let first = main.getStatements()[count];
|
|
58910
58927
|
while (first !== undefined && first.get() instanceof _statement_1.Comment) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abaplint/cli",
|
|
3
|
-
"version": "2.99.
|
|
3
|
+
"version": "2.99.10",
|
|
4
4
|
"description": "abaplint - Command Line Interface",
|
|
5
5
|
"bin": {
|
|
6
6
|
"abaplint": "./abaplint"
|
|
@@ -37,12 +37,12 @@
|
|
|
37
37
|
},
|
|
38
38
|
"homepage": "https://abaplint.org",
|
|
39
39
|
"devDependencies": {
|
|
40
|
-
"@abaplint/core": "^2.99.
|
|
40
|
+
"@abaplint/core": "^2.99.10",
|
|
41
41
|
"@types/chai": "^4.3.5",
|
|
42
42
|
"@types/glob": "^7.2.0",
|
|
43
43
|
"@types/minimist": "^1.2.2",
|
|
44
44
|
"@types/mocha": "^10.0.1",
|
|
45
|
-
"@types/node": "^20.1.
|
|
45
|
+
"@types/node": "^20.1.2",
|
|
46
46
|
"@types/progress": "^2.0.5",
|
|
47
47
|
"chai": "^4.3.7",
|
|
48
48
|
"chalk": "^5.2.0",
|
|
@@ -54,8 +54,8 @@
|
|
|
54
54
|
"mocha": "^10.2.0",
|
|
55
55
|
"progress": "^2.0.3",
|
|
56
56
|
"typescript": "^5.0.4",
|
|
57
|
-
"webpack": "^5.82.
|
|
58
|
-
"webpack-cli": "^5.1.
|
|
57
|
+
"webpack": "^5.82.1",
|
|
58
|
+
"webpack-cli": "^5.1.1",
|
|
59
59
|
"xml-js": "^1.6.11"
|
|
60
60
|
},
|
|
61
61
|
"dependencies": {}
|