This commit is contained in:
uan
2026-02-06 16:02:40 +01:00
parent dee3a5dfed
commit db1b4b88c0
2 changed files with 0 additions and 10 deletions

View File

@@ -176,24 +176,14 @@ fn (mut g Generator) gen_expr(expr Expr) {
label := g.get_print_label(inner_expr); label := g.get_print_label(inner_expr);
if g.symbols.lookup_class(expr_type) != none { if g.symbols.lookup_class(expr_type) != none {
class_name := mangle_struct(expr_type) class_name := mangle_struct(expr_type)
/*if label != "" {
g.out.write_string('${label}: ");')
}*/
g.out.write_string('print_${class_name}(') g.out.write_string('print_${class_name}(')
g.gen_expr(inner_expr) g.gen_expr(inner_expr)
g.out.write_string(', 0);') g.out.write_string(', 0);')
} else { } else {
g.out.write_string('printf(\"') g.out.write_string('printf(\"')
dump(label); dump(label);
if label != "" {
g.out.write_string('(${label}')
g.out.write_string(': ');
}
format := get_type_format(expr_type) format := get_type_format(expr_type)
g.out.write_string('%${format}') g.out.write_string('%${format}')
if label != "" {
g.out.write_string(')')
}
g.out.write_string('\", ') g.out.write_string('\", ')
g.gen_expr(inner_expr) g.gen_expr(inner_expr)
g.out.write_string(');') g.out.write_string(');')

BIN
one Executable file

Binary file not shown.