mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
compiler: tmp variables on scripts inside generated main function
This commit is contained in:
parent
01d5f4d744
commit
dc8c84a2a8
@ -259,8 +259,11 @@ fn (p mut Parser) parse() {
|
||||
p.cur_fn.clear_vars()
|
||||
}
|
||||
}
|
||||
start := p.cgen.lines.len
|
||||
mut start := p.cgen.lines.len
|
||||
p.statement(true)
|
||||
if p.cgen.lines[start - 1] != '' && p.cgen.fn_main != '' {
|
||||
start--
|
||||
}
|
||||
p.genln('')
|
||||
end := p.cgen.lines.len
|
||||
lines := p.cgen.lines.slice(start, end)
|
||||
|
Loading…
Reference in New Issue
Block a user