mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
$if glibc {
This commit is contained in:
parent
ef9cae6dc0
commit
c7e6d379da
@ -73,6 +73,14 @@ fn (p mut Parser) comp_time() {
|
|||||||
p.genln('#endif')
|
p.genln('#endif')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if name == 'glibc' {
|
||||||
|
p.genln('#ifdef __GLIBC__')
|
||||||
|
p.check(.lcbr)
|
||||||
|
p.statements_no_rcbr()
|
||||||
|
if ! (p.tok == .dollar && p.peek() == .key_else) {
|
||||||
|
p.genln('#endif')
|
||||||
|
}
|
||||||
|
}
|
||||||
else {
|
else {
|
||||||
println('Supported platforms:')
|
println('Supported platforms:')
|
||||||
println(supported_platforms)
|
println(supported_platforms)
|
||||||
@ -229,7 +237,7 @@ fn (p mut Parser) chash() {
|
|||||||
$if !js {
|
$if !js {
|
||||||
if !p.can_chash {
|
if !p.can_chash {
|
||||||
println('hash="$hash"')
|
println('hash="$hash"')
|
||||||
if hash.starts_with('include') { println("include") } else {}
|
if hash.starts_with('include') { println("include") } else {}
|
||||||
p.error('bad token `#` (embedding C code is no longer supported)')
|
p.error('bad token `#` (embedding C code is no longer supported)')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user