@abaplint/core 2.84.9 → 2.84.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.
|
@@ -46,17 +46,18 @@ class ExpandMacros {
|
|
|
46
46
|
let contents = [];
|
|
47
47
|
for (let i = 0; i < statements.length; i++) {
|
|
48
48
|
const statement = statements[i];
|
|
49
|
-
|
|
49
|
+
const type = statement.get();
|
|
50
|
+
if (type instanceof Statements.Define) {
|
|
50
51
|
// todo, will this break if first token is a pragma?
|
|
51
52
|
name = statement.getTokens()[1].getStr();
|
|
52
53
|
contents = [];
|
|
53
54
|
}
|
|
54
55
|
else if (name) {
|
|
55
|
-
if (
|
|
56
|
+
if (type instanceof Statements.EndOfDefinition) {
|
|
56
57
|
this.macros.addMacro(name, contents);
|
|
57
58
|
name = undefined;
|
|
58
59
|
}
|
|
59
|
-
else if (!(
|
|
60
|
+
else if (!(type instanceof _statement_1.Comment)) {
|
|
60
61
|
statements[i] = new statement_node_1.StatementNode(new _statement_1.MacroContent()).setChildren(this.tokensToNodes(statement.getTokens()));
|
|
61
62
|
contents.push(statements[i]);
|
|
62
63
|
}
|
|
@@ -67,7 +68,8 @@ class ExpandMacros {
|
|
|
67
68
|
const result = [];
|
|
68
69
|
let containsUnknown = false;
|
|
69
70
|
for (const statement of statements) {
|
|
70
|
-
|
|
71
|
+
const type = statement.get();
|
|
72
|
+
if (type instanceof _statement_1.Unknown || type instanceof _statement_1.MacroCall) {
|
|
71
73
|
const macroName = this.findName(statement.getTokens());
|
|
72
74
|
if (macroName && this.macros.isMacro(macroName)) {
|
|
73
75
|
result.push(new statement_node_1.StatementNode(new _statement_1.MacroCall()).setChildren(this.tokensToNodes(statement.getTokens())));
|
|
@@ -114,7 +114,7 @@ class FindGlobalDefinitions {
|
|
|
114
114
|
obj.setDefinition(undefined);
|
|
115
115
|
}
|
|
116
116
|
}
|
|
117
|
-
else
|
|
117
|
+
else {
|
|
118
118
|
const found = struc === null || struc === void 0 ? void 0 : struc.findFirstStructure(Structures.ClassDefinition);
|
|
119
119
|
if (struc && file && found) {
|
|
120
120
|
try {
|
|
@@ -30,6 +30,7 @@ class Diagnostics {
|
|
|
30
30
|
end: { line: issue.getEnd().getRow() - 1, character: issue.getEnd().getCol() - 1 },
|
|
31
31
|
},
|
|
32
32
|
code: issue.getKey(),
|
|
33
|
+
codeDescription: { href: "https://rules.abaplint.org/" + issue.getKey() + "/" },
|
|
33
34
|
message: issue.getMessage().toString(),
|
|
34
35
|
source: "abaplint",
|
|
35
36
|
};
|
|
@@ -41,7 +41,7 @@ class ABAPObject extends _abstract_object_1.AbstractObject {
|
|
|
41
41
|
return undefined;
|
|
42
42
|
}
|
|
43
43
|
getMainABAPFile() {
|
|
44
|
-
// todo, uris
|
|
44
|
+
// todo, uris, https://github.com/abaplint/abaplint/issues/673
|
|
45
45
|
const search = this.getName().replace(/\//g, "#").toLowerCase() + "." + this.getType().toLowerCase() + ".abap";
|
|
46
46
|
for (const file of this.getABAPFiles()) {
|
|
47
47
|
if (file.getFilename().endsWith(search)) {
|
package/build/src/registry.js
CHANGED