Add generator for directives