allow building code with [live] without -live
parent
1ef0f3b549
commit
53b6c91d18
|
@ -117,9 +117,9 @@ fn (p mut Parser) fn_decl() {
|
||||||
p.fgen('fn ')
|
p.fgen('fn ')
|
||||||
defer { p.fgenln('\n') }
|
defer { p.fgenln('\n') }
|
||||||
is_pub := p.tok == .key_pub
|
is_pub := p.tok == .key_pub
|
||||||
is_live := p.attr == 'live' && !p.pref.is_so
|
is_live := p.attr == 'live' && !p.pref.is_so && p.pref.is_live
|
||||||
if is_live && !p.pref.is_live {
|
if p.attr == 'live' && p.first_run() {
|
||||||
p.error('run `v -live program.v` if you want to use [live] functions')
|
println('INFO: run `v -live program.v` if you want to use [live] functions')
|
||||||
}
|
}
|
||||||
if is_pub {
|
if is_pub {
|
||||||
p.next()
|
p.next()
|
||||||
|
|
Loading…
Reference in New Issue