-
This commit is contained in:
@@ -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\", ')
|
||||
|
||||
Reference in New Issue
Block a user