Skip to content

Commit

Permalink
Fix #3963 Arguments in AST can have label
Browse files Browse the repository at this point in the history
  • Loading branch information
James-Yu committed Jul 12, 2023
1 parent 48fe48a commit 0f8b276
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/providers/completer/reference.ts
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,14 @@ export class Reference implements IProvider {
})
}

if ('content' in node && typeof node.content !== 'string') {

if (node.type === 'macro' && node.args) {
for (const arg of node.args) {
for (const subNode of arg.content) {
refs = [...refs, ...this.parseAst(subNode, lines, labelMacros)]
}
}
} else if ('content' in node && typeof node.content !== 'string') {
for (const subNode of node.content) {
refs = [...refs, ...this.parseAst(subNode, lines, labelMacros)]
}
Expand Down

0 comments on commit 0f8b276

Please sign in to comment.