mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
cgen: gen str() from eprintln and eprint as well
This commit is contained in:
parent
420ecaf31d
commit
c1d9e22ca6
@ -366,9 +366,9 @@ fn (g mut Gen) expr(node ast.Expr) {
|
||||
// `user := User{name: 'Bob'}`
|
||||
ast.StructInit {}
|
||||
ast.CallExpr {
|
||||
if it.name == 'println' || it.name == 'print' {
|
||||
if it.name in ['println', 'print', 'eprintln', 'eprint'] {
|
||||
expr := it.args[0].expr
|
||||
g.gen_print_from_expr(expr, it.name == 'println')
|
||||
g.gen_print_from_expr(expr, it.name in ['println', 'eprintln'])
|
||||
}
|
||||
/*
|
||||
g.write('${it.name}(')
|
||||
|
Loading…
Reference in New Issue
Block a user