mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
compiler: support for custom flags
[if custom]fn..{} , #flag custom, $if custom {}
This commit is contained in:
committed by
Alexander Medvednikov
parent
42b1660c7e
commit
6e130cd446
@@ -351,7 +351,11 @@ fn os_name_to_ifdef(name string) string {
|
||||
return ''
|
||||
}
|
||||
|
||||
fn platform_postfix_to_ifdefguard(name string) string {
|
||||
fn (v &V) platform_postfix_to_ifdefguard(name string) string {
|
||||
if name.starts_with('custom '){
|
||||
cdefine := name.replace('custom ','')
|
||||
return '#ifdef CUSTOM_DEFINE_${cdefine}'
|
||||
}
|
||||
s := match name {
|
||||
'.v'{
|
||||
''
|
||||
|
||||
Reference in New Issue
Block a user