Function parsing & codegen