1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

ast: add str for EnumDecl (#7977)

This commit is contained in:
zakuro 2021-01-10 03:49:27 +09:00 committed by GitHub
parent aa37382e8d
commit 407da09acf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -348,6 +348,9 @@ pub fn (node Stmt) str() string {
FnDecl {
return 'fn ${node.name}( $node.params.len params ) { $node.stmts.len stmts }'
}
EnumDecl {
return 'enum $node.name { $node.fields.len fields }'
}
StructDecl {
return 'struct $node.name { $node.fields.len fields }'
}