add current function in code generator