add pre_codegenerator