mirror of
https://github.com/vlang/v.git
synced 2025-09-09 07:15:50 -04:00
cgen: fix missing line breaks in generated code with closure IIFE, when compiled with '-g' (fix #20306) (#20316)
This commit is contained in:
parent
969402461f
commit
cc250baf3c
@ -16,7 +16,7 @@ import sokol.gfx
|
||||
import sokol.sgl
|
||||
import sokol.sapp
|
||||
import stbi
|
||||
import szip
|
||||
import compress.szip
|
||||
import strings
|
||||
|
||||
// Help text
|
||||
@ -801,10 +801,10 @@ fn main() {
|
||||
|
||||
// App init
|
||||
mut app := &App{
|
||||
gg: 0
|
||||
gg: unsafe { nil }
|
||||
// zip fields
|
||||
zip: 0
|
||||
item_list: 0
|
||||
zip: unsafe { nil }
|
||||
item_list: unsafe { nil }
|
||||
}
|
||||
|
||||
app.state = .scanning
|
||||
|
@ -9,7 +9,7 @@
|
||||
* TODO:
|
||||
**********************************************************************/
|
||||
import sokol.gfx
|
||||
import szip
|
||||
import compress.szip
|
||||
|
||||
fn (mut il Item_list) scan_zip(path string, in_index int) ! {
|
||||
println('Scanning ZIP [${path}]')
|
||||
|
@ -701,6 +701,9 @@ fn (mut g Gen) call_expr(node ast.CallExpr) {
|
||||
g.expr(node.left)
|
||||
g.writeln(';')
|
||||
g.write(line)
|
||||
if g.out.last_n(1) != '\n' {
|
||||
g.writeln('')
|
||||
}
|
||||
g.write(tmp_var)
|
||||
} else if node.or_block.kind == .absent {
|
||||
g.expr(node.left)
|
||||
|
Loading…
x
Reference in New Issue
Block a user