Allow use FP without calling it

pull/1813/head
teggot 2019-09-01 01:40:53 +03:00 committed by Alexander Medvednikov
parent 4abfb686ec
commit c04cca1ae4
1 changed files with 4 additions and 3 deletions

View File

@ -1649,9 +1649,10 @@ fn (p mut Parser) var_expr(v Var) string {
p.next()
mut typ := v.typ
// Function pointer?
if typ.starts_with('fn ') {
//println('CALLING FN PTR')
//p.print_tok()
//println('CALLING FN PTR')
//p.print_tok()
if typ.starts_with('fn ') && p.tok == .lpar {
T := p.table.find_type(typ)
p.gen('(')
p.fn_call_args(mut T.func)