diff --git a/server/pkg/parser/node_to_function.go b/server/pkg/parser/node_to_function.go index fbe30c5..bfd75e6 100644 --- a/server/pkg/parser/node_to_function.go +++ b/server/pkg/parser/node_to_function.go @@ -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,