-
-
Notifications
You must be signed in to change notification settings - Fork 111
Expose doc comment contents #212
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Expose doc comment contents #212
Conversation
Do you want to alias it as a literal instead for consistency? (might be easier for queries too?) |
Do you mean the marker or the comment's contents? I'm not very familiar with this grammar but it looks like the existing literal rules are used for values like ints/floats/etc. With these changes the queries we would add for Helix are pretty simple (- just what I listed above) |
5b3d7a8
to
35f4a5b
Compare
I meant the markers, sorry for not being clear. I do like your content changes though Though you'll need to rebase since there was an edge case I fixed w.r.t. empty line doc comments eating up contents on the following line |
Also regenerate with 0.21.0 😁 (and redo the test updates with |
2a7a942
to
03ad90a
Compare
03ad90a
to
c524e8f
Compare
Really sorry for taking forever on this |
No worries, I've been testing this locally in the meantime. Thanks! |
#195 parsed doc comments but it exposed the nodes for the doc comment markers (
!
//
) rather than the content of the comments. The comment content is useful for injecting markdown into the comments:I've also changed the line doc comment slightly to fix an issue with the marker node (it unnecessarily consumed the character after the
///
) and to include the line's line-ending, which is useful to tree-sitter-markdown.cc @ProfDoof I've only made the change to line comments, I may need some help to make block comments have the same structureBlock comment changes are included as well.