@abaplint/core 2.113.103 → 2.113.105
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.
|
@@ -6,7 +6,7 @@ const source_1 = require("./source");
|
|
|
6
6
|
const let_1 = require("./let");
|
|
7
7
|
const cond_1 = require("./cond");
|
|
8
8
|
class CondBody {
|
|
9
|
-
runSyntax(node, input) {
|
|
9
|
+
runSyntax(node, input, targetType) {
|
|
10
10
|
if (node === undefined) {
|
|
11
11
|
return undefined;
|
|
12
12
|
}
|
|
@@ -21,10 +21,10 @@ class CondBody {
|
|
|
21
21
|
let type = undefined;
|
|
22
22
|
for (const s of node.findDirectExpressions(Expressions.Source)) {
|
|
23
23
|
if (type === undefined) {
|
|
24
|
-
type = new source_1.Source().runSyntax(s, input);
|
|
24
|
+
type = new source_1.Source().runSyntax(s, input, targetType);
|
|
25
25
|
}
|
|
26
26
|
else {
|
|
27
|
-
new source_1.Source().runSyntax(s, input);
|
|
27
|
+
new source_1.Source().runSyntax(s, input, targetType);
|
|
28
28
|
}
|
|
29
29
|
}
|
|
30
30
|
if (scoped === true) {
|
|
@@ -93,7 +93,7 @@ class Source {
|
|
|
93
93
|
case "COND":
|
|
94
94
|
{
|
|
95
95
|
const foundType = this.determineType(node, input, targetType);
|
|
96
|
-
const bodyType = new cond_body_1.CondBody().runSyntax(node.findDirectExpression(Expressions.CondBody), input);
|
|
96
|
+
const bodyType = new cond_body_1.CondBody().runSyntax(node.findDirectExpression(Expressions.CondBody), input, foundType);
|
|
97
97
|
if (foundType === undefined || foundType.isGeneric()) {
|
|
98
98
|
this.addIfInferred(node, input, bodyType);
|
|
99
99
|
}
|
package/build/src/lsp/symbols.js
CHANGED
|
@@ -3,8 +3,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.Symbols = void 0;
|
|
4
4
|
/* eslint-disable max-len */
|
|
5
5
|
const LServer = require("vscode-languageserver-types");
|
|
6
|
+
const _identifier_1 = require("../abap/4_file_information/_identifier");
|
|
6
7
|
const _lsp_utils_1 = require("./_lsp_utils");
|
|
7
8
|
const statements_1 = require("../abap/2_statements/statements");
|
|
9
|
+
const Statements = require("../abap/2_statements/statements");
|
|
10
|
+
const Expressions = require("../abap/2_statements/expressions");
|
|
8
11
|
class Symbols {
|
|
9
12
|
constructor(reg) {
|
|
10
13
|
this.reg = reg;
|
|
@@ -17,6 +20,7 @@ class Symbols {
|
|
|
17
20
|
const ret = [];
|
|
18
21
|
ret.push(...this.outputClasses(file));
|
|
19
22
|
ret.push(...this.outputForms(file));
|
|
23
|
+
ret.push(...this.outputModules(file));
|
|
20
24
|
return ret;
|
|
21
25
|
}
|
|
22
26
|
selectionRange(identifier) {
|
|
@@ -57,6 +61,22 @@ class Symbols {
|
|
|
57
61
|
}
|
|
58
62
|
return ret;
|
|
59
63
|
}
|
|
64
|
+
outputModules(file) {
|
|
65
|
+
var _a;
|
|
66
|
+
const ret = [];
|
|
67
|
+
for (const statement of file.getStatements()) {
|
|
68
|
+
if (statement.get() instanceof Statements.Module) {
|
|
69
|
+
const nameToken = (_a = statement.findFirstExpression(Expressions.FormName)) === null || _a === void 0 ? void 0 : _a.getFirstToken();
|
|
70
|
+
if (nameToken === undefined) {
|
|
71
|
+
continue;
|
|
72
|
+
}
|
|
73
|
+
const identifier = new _identifier_1.Identifier(nameToken, file.getFilename());
|
|
74
|
+
const symbol = this.newSymbol(identifier, LServer.SymbolKind.Module, []);
|
|
75
|
+
ret.push(symbol);
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
return ret;
|
|
79
|
+
}
|
|
60
80
|
outputClasses(file) {
|
|
61
81
|
const ret = [];
|
|
62
82
|
for (const cla of file.getInfo().listClassDefinitions()) {
|
package/build/src/registry.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abaplint/core",
|
|
3
|
-
"version": "2.113.
|
|
3
|
+
"version": "2.113.105",
|
|
4
4
|
"description": "abaplint - Core API",
|
|
5
5
|
"main": "build/src/index.js",
|
|
6
6
|
"typings": "build/abaplint.d.ts",
|
|
@@ -50,20 +50,20 @@
|
|
|
50
50
|
},
|
|
51
51
|
"homepage": "https://abaplint.org",
|
|
52
52
|
"devDependencies": {
|
|
53
|
-
"@microsoft/api-extractor": "^7.
|
|
53
|
+
"@microsoft/api-extractor": "^7.51.1",
|
|
54
54
|
"@types/chai": "^4.3.20",
|
|
55
55
|
"@types/mocha": "^10.0.10",
|
|
56
|
-
"@types/node": "^22.13.
|
|
56
|
+
"@types/node": "^22.13.9",
|
|
57
57
|
"chai": "^4.5.0",
|
|
58
|
-
"eslint": "^9.
|
|
58
|
+
"eslint": "^9.21.0",
|
|
59
59
|
"mocha": "^11.1.0",
|
|
60
60
|
"c8": "^10.1.3",
|
|
61
61
|
"source-map-support": "^0.5.21",
|
|
62
62
|
"ts-json-schema-generator": "^2.3.0",
|
|
63
|
-
"typescript": "^5.
|
|
63
|
+
"typescript": "^5.8.2"
|
|
64
64
|
},
|
|
65
65
|
"dependencies": {
|
|
66
|
-
"fast-xml-parser": "^4.5.
|
|
66
|
+
"fast-xml-parser": "^4.5.3",
|
|
67
67
|
"json5": "^2.2.3",
|
|
68
68
|
"vscode-languageserver-types": "^3.17.5"
|
|
69
69
|
}
|