Add support for comments - line and doc
Something to keep in mind for this one: supporting references in doc comments. For example, if I have:
import 'foo.dart' as _i1;
/// This class extends [Foo].
class Bar extends _i1.Foo {}
Then I get a "Only reference in scope identifiers in doc comments" lint report. If a first-class Doc comment could be made, I could add text ("This class extends ") and references (TypeReference(...)).
@srawlins if you take another stab at this my wish list would be
- Add line breaks to support formatting line lengths
- Some markdown support, like adding a link to a URL
- Example code block
Good ideas. I don't foresee mailing a PR any time soon.
https://github.com/dart-lang/code_builder/pull/389 implements a little bit of this - the ability to have line comments for libraries, emitted at the beginning of the file (// Generated by ...).