mirror of
https://github.com/vlang/v.git
synced 2025-09-17 11:26:17 -04:00
ast: add str for StructDecl (#7934)
This commit is contained in:
parent
ad79d55a5c
commit
af1d28dee7
@ -348,6 +348,9 @@ pub fn (node Stmt) str() string {
|
|||||||
FnDecl {
|
FnDecl {
|
||||||
return 'fn ${node.name}() { $node.stmts.len stmts }'
|
return 'fn ${node.name}() { $node.stmts.len stmts }'
|
||||||
}
|
}
|
||||||
|
StructDecl {
|
||||||
|
return 'struct $node.name { $node.fields.len fields }'
|
||||||
|
}
|
||||||
else {
|
else {
|
||||||
return '[unhandled stmt str type: ${typeof(node)} ]'
|
return '[unhandled stmt str type: ${typeof(node)} ]'
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user