1
0
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:
Delyan Angelov
2019-12-23 12:09:00 +02:00
committed by Alexander Medvednikov
parent 42b1660c7e
commit 6e130cd446
7 changed files with 107 additions and 21 deletions

View File

@@ -749,7 +749,7 @@ fn (p mut Parser) verify_fn_before_call(f &Fn) {
// p.tok == fn_name
fn (p mut Parser) fn_call(f mut Fn, method_ph int, receiver_var, receiver_type string) {
p.verify_fn_before_call(f)
is_comptime_define := f.comptime_define != '' && f.comptime_define != p.pref.comptime_define
is_comptime_define := f.comptime_define != '' && !(f.comptime_define in p.v.compile_defines )
if is_comptime_define {
p.cgen.nogen = true
}