1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

$if debug {

This commit is contained in:
Alexander Medvednikov
2019-08-16 08:50:36 +03:00
parent 87216cff63
commit c0cc4701af
2 changed files with 10 additions and 1 deletions

View File

@@ -34,6 +34,12 @@ fn (p mut Parser) comp_time() {
p.genln('#endif')
}
}
else if name == 'debug' {
p.genln('#ifdef VDEBUG')
p.check(.lcbr)
p.statements_no_rcbr()
p.genln('#endif')
}
else {
println('Supported platforms:')
println(SupportedPlatforms)
@@ -51,7 +57,7 @@ fn (p mut Parser) comp_time() {
p.genln('#endif')
else_returns := p.returns
p.returns = if_returns && else_returns
p.gen('/* returns $p.returns */')
p.gen('/* returns $p.returns */')
}
}
else if p.tok == .key_for {