mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
cgen: fix ./tracev examples/hello_world.v
This commit is contained in:
parent
6bf2ad1ff0
commit
49c12e4d1c
@ -7,7 +7,11 @@ import v.util
|
||||
|
||||
fn (mut g Gen) write(s string) {
|
||||
$if trace_gen ? {
|
||||
eprintln('gen file: ${g.file.path:-30} | last_fn_c_name: ${g.last_fn_c_name:-45} | write: $s')
|
||||
if g.file == unsafe { nil } {
|
||||
eprintln('gen file: <nil> | last_fn_c_name: ${g.last_fn_c_name:-45} | write: $s')
|
||||
} else {
|
||||
eprintln('gen file: ${g.file.path:-30} | last_fn_c_name: ${g.last_fn_c_name:-45} | write: $s')
|
||||
}
|
||||
}
|
||||
if g.indent > 0 && g.empty_line {
|
||||
g.out.write_string(util.tabs(g.indent))
|
||||
@ -20,7 +24,11 @@ fn (mut g Gen) write(s string) {
|
||||
|
||||
fn (mut g Gen) writeln(s string) {
|
||||
$if trace_gen ? {
|
||||
eprintln('gen file: ${g.file.path:-30} | last_fn_c_name: ${g.last_fn_c_name:-45} | writeln: $s')
|
||||
if g.file == unsafe { nil } {
|
||||
eprintln('gen file: <nil> | last_fn_c_name: ${g.last_fn_c_name:-45} | writeln: $s')
|
||||
} else {
|
||||
eprintln('gen file: ${g.file.path:-30} | last_fn_c_name: ${g.last_fn_c_name:-45} | writeln: $s')
|
||||
}
|
||||
}
|
||||
if g.indent > 0 && g.empty_line {
|
||||
g.out.write_string(util.tabs(g.indent))
|
||||
|
Loading…
Reference in New Issue
Block a user