mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
all: use the new types with old syntax (#6922)
This commit is contained in:
@ -77,7 +77,7 @@ fn (mut d Doc) convert_pos(filename string, pos token.Position) DocPos {
|
||||
}
|
||||
|
||||
pub fn (mut d Doc) stmt_signature(stmt ast.Stmt) string {
|
||||
match stmt {
|
||||
match union stmt {
|
||||
ast.Module {
|
||||
return 'module $stmt.name'
|
||||
}
|
||||
@ -93,9 +93,9 @@ pub fn (mut d Doc) stmt_signature(stmt ast.Stmt) string {
|
||||
}
|
||||
|
||||
pub fn (d Doc) stmt_name(stmt ast.Stmt) string {
|
||||
match stmt {
|
||||
match union stmt {
|
||||
ast.FnDecl, ast.StructDecl, ast.EnumDecl, ast.InterfaceDecl { return stmt.name }
|
||||
ast.TypeDecl { match stmt {
|
||||
ast.TypeDecl { match union stmt {
|
||||
ast.SumTypeDecl, ast.FnTypeDecl, ast.AliasTypeDecl, ast.UnionSumTypeDecl { return stmt.name }
|
||||
} }
|
||||
ast.ConstDecl { return '' } // leave it blank
|
||||
|
Reference in New Issue
Block a user