Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
vdoc: fix parsing of static functions
Browse files Browse the repository at this point in the history
Delta456 committed Nov 14, 2023
1 parent 80e93c1 commit 82bc0c8
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion vlib/v/doc/utils.v
Original file line number Diff line number Diff line change
@@ -131,9 +131,12 @@ pub fn (mut d Doc) stmt_signature(stmt ast.Stmt) string {
// stmt_name returns the name of a given `ast.Stmt` node.
pub fn (d Doc) stmt_name(stmt ast.Stmt) string {
match stmt {
ast.FnDecl, ast.StructDecl, ast.EnumDecl, ast.InterfaceDecl {
ast.StructDecl, ast.EnumDecl, ast.InterfaceDecl {
return stmt.name
}
ast.FnDecl {
return stmt.get_name()
}
ast.TypeDecl {
match stmt {
ast.FnTypeDecl, ast.AliasTypeDecl, ast.SumTypeDecl { return stmt.name }

0 comments on commit 82bc0c8

Please sign in to comment.