Recently we added support for optionally parsing comments. We should probably also have a public function in the writer that allows one to write a comment. I.e.:
addComment(comment: string) {
this._outputStream.push('# ' + comment . "\n");
}
In the StreamWriter, it could then be listening in on comment events from the input.
Does this sound reasonable? If so, I can open a PR.
EDIT: we need to be careful about newlines in the comment string
Recently we added support for optionally parsing comments. We should probably also have a public function in the writer that allows one to write a comment. I.e.:
In the StreamWriter, it could then be listening in on
commentevents from the input.Does this sound reasonable? If so, I can open a PR.
EDIT: we need to be careful about newlines in the comment string