Allow use FP without calling it
parent
4abfb686ec
commit
c04cca1ae4
|
@ -1649,9 +1649,10 @@ fn (p mut Parser) var_expr(v Var) string {
|
||||||
p.next()
|
p.next()
|
||||||
mut typ := v.typ
|
mut typ := v.typ
|
||||||
// Function pointer?
|
// Function pointer?
|
||||||
if typ.starts_with('fn ') {
|
|
||||||
//println('CALLING FN PTR')
|
//println('CALLING FN PTR')
|
||||||
//p.print_tok()
|
//p.print_tok()
|
||||||
|
if typ.starts_with('fn ') && p.tok == .lpar {
|
||||||
T := p.table.find_type(typ)
|
T := p.table.find_type(typ)
|
||||||
p.gen('(')
|
p.gen('(')
|
||||||
p.fn_call_args(mut T.func)
|
p.fn_call_args(mut T.func)
|
||||||
|
|
Loading…
Reference in New Issue