writeToSink method
Implementation
void writeToSink(StringSink sink) {
final emmiter = DartEmitter(
orderDirectives: true,
useNullSafetySyntax: true,
);
final library = Library((builder) {
builder.directives = _directives;
builder.body = _body;
});
sink.write(library.accept(emmiter));
}