Adds the text function for the generate pass.