ast: add str for EnumDecl (#7977)
parent
aa37382e8d
commit
407da09acf
|
@ -348,6 +348,9 @@ pub fn (node Stmt) str() string {
|
||||||
FnDecl {
|
FnDecl {
|
||||||
return 'fn ${node.name}( $node.params.len params ) { $node.stmts.len stmts }'
|
return 'fn ${node.name}( $node.params.len params ) { $node.stmts.len stmts }'
|
||||||
}
|
}
|
||||||
|
EnumDecl {
|
||||||
|
return 'enum $node.name { $node.fields.len fields }'
|
||||||
|
}
|
||||||
StructDecl {
|
StructDecl {
|
||||||
return 'struct $node.name { $node.fields.len fields }'
|
return 'struct $node.name { $node.fields.len fields }'
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue