This commit is contained in:
uan
2026-02-04 21:13:22 +01:00
parent ff30ef8153
commit ce51292f7c
5 changed files with 11 additions and 9 deletions

View File

@@ -73,9 +73,8 @@ fn (mut g Generator) gen_expr(expr Expr) {
PrintExpr {
g.out.write_string('printf(\"%')
format := match expr.type {
'int' {'d'}
'int', 'bool' {'d'}
'real' {'lf'}
'bool' {'d'}
else {panic("Tried printing illegal type")}
}
g.out.write_string('${format}\\n\", ')