From af1d28dee77a0098714347eb1fb2c6fec88e31a1 Mon Sep 17 00:00:00 2001 From: zakuro Date: Fri, 8 Jan 2021 04:25:04 +0900 Subject: [PATCH] ast: add str for StructDecl (#7934) --- vlib/v/ast/str.v | 3 +++ 1 file changed, 3 insertions(+) diff --git a/vlib/v/ast/str.v b/vlib/v/ast/str.v index eae56fc4ce..303f2597a4 100644 --- a/vlib/v/ast/str.v +++ b/vlib/v/ast/str.v @@ -348,6 +348,9 @@ pub fn (node Stmt) str() string { FnDecl { return 'fn ${node.name}() { $node.stmts.len stmts }' } + StructDecl { + return 'struct $node.name { $node.fields.len fields }' + } else { return '[unhandled stmt str type: ${typeof(node)} ]' }