pure generateCode can generate main