We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5bb71d4 commit 2effa52Copy full SHA for 2effa52
server/src/util/declarations.ts
@@ -37,11 +37,7 @@ export function getGlobalDeclarations({
37
const diagnostics: LSP.Diagnostic[] = []
38
const globalDeclarations: GlobalDeclarations = {}
39
40
- TreeSitterUtil.forEach(tree.rootNode, (node: Parser.SyntaxNode) => {
41
- if (node.parent?.type !== 'program') {
42
- return
43
- }
44
-
+ tree.rootNode.children.forEach((node) => {
45
if (node.type === 'ERROR') {
46
diagnostics.push(
47
LSP.Diagnostic.create(
@@ -61,8 +57,6 @@ export function getGlobalDeclarations({
61
57
globalDeclarations[word] = symbol
62
58
}
63
59
64
65
66
60
})
67
68
return { diagnostics, globalDeclarations }
0 commit comments