Skip to content

Commit

Permalink
Check for macro without name
Browse files Browse the repository at this point in the history
  • Loading branch information
pherrymason committed Sep 15, 2024
1 parent 9730c5b commit f7add67
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion server/pkg/parser/node_to_function.go
Original file line number Diff line number Diff line change
Expand Up @@ -221,8 +221,13 @@ func (p *Parser) nodeToMacro(node *sitter.Node, currentModule *idx.Module, docId
}
}

macroName := "??"
if nameNode != nil {
macroName = nameNode.Content(sourceCode)
}

symbol := idx.NewMacro(
nameNode.Content(sourceCode),
macroName,
argumentIds,
currentModule.GetModuleString(),
*docId,
Expand Down

0 comments on commit f7add67

Please sign in to comment.