mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
$if debug {
This commit is contained in:
parent
87216cff63
commit
c0cc4701af
@ -34,6 +34,12 @@ fn (p mut Parser) comp_time() {
|
|||||||
p.genln('#endif')
|
p.genln('#endif')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if name == 'debug' {
|
||||||
|
p.genln('#ifdef VDEBUG')
|
||||||
|
p.check(.lcbr)
|
||||||
|
p.statements_no_rcbr()
|
||||||
|
p.genln('#endif')
|
||||||
|
}
|
||||||
else {
|
else {
|
||||||
println('Supported platforms:')
|
println('Supported platforms:')
|
||||||
println(SupportedPlatforms)
|
println(SupportedPlatforms)
|
||||||
|
@ -232,6 +232,9 @@ fn (v mut V) compile() {
|
|||||||
if v.pref.is_play {
|
if v.pref.is_play {
|
||||||
cgen.genln('#define VPLAY (1) ')
|
cgen.genln('#define VPLAY (1) ')
|
||||||
}
|
}
|
||||||
|
if v.pref.is_debug {
|
||||||
|
cgen.genln('#define VDEBUG (1) ')
|
||||||
|
}
|
||||||
cgen.genln('
|
cgen.genln('
|
||||||
#include <stdio.h> // TODO remove all these includes, define all function signatures and types manually
|
#include <stdio.h> // TODO remove all these includes, define all function signatures and types manually
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
Loading…
Reference in New Issue
Block a user