Skip to content

Commit

Permalink
improve docs for DisplaySignature
Browse files Browse the repository at this point in the history
  • Loading branch information
PgBiel committed Jan 26, 2025
1 parent f9f6732 commit 9faa5ea
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion server/pkg/symbols/function.go
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,12 @@ func (f *Function) GetArguments() []*Variable {
return arguments
}

// Display the function's signature.
// Display the function's signature to show in types, on hover etc.
//
// Returns either a string like `fn void abc(int param)` if `includeName` is
// `true`, or `fn void(int param)` otherwise. If this is a macro, returns
// `macro void abc(int param; @body)` (with the correct keyword, and correctly
// displaying the trailing body parameter) instead.
func (f *Function) DisplaySignature(includeName bool) string {
var declKeyword string
if f.fType == Macro {
Expand Down

0 comments on commit 9faa5ea

Please sign in to comment.