Add function description parsing

This commit is contained in:
2024-11-06 00:28:17 +01:00
parent 0e289d282a
commit 0cdc57bf9a
3 changed files with 16 additions and 3 deletions

View File

@@ -1,8 +1,10 @@
---@diagnostic disable: missing-return, lowercase-global
{{range .Arguments -}}
---@param {{.Name}} {{.Type}} {{.Description}}
{{end -}}
{{range .Returns -}}
---@return {{.Type}} {{.Name}} {{if .Description}}#{{.Description}}{{end}}
{{end -}}
{{if .Description}}---{{.Description}}{{end}}
function {{.Name}}({{range $index, $param := .Arguments}}{{if $index}}, {{end}}{{$param.Name}}{{end}}) end