Conversation
This stack of pull requests is managed by Graphite. Learn more about stacking. |
10959f1 to
ed6eba1
Compare
| } | ||
| } | ||
|
|
||
| fn collect_comments(comment_node: Option<CommentNode>) -> Vec<Comment> { |
There was a problem hiding this comment.
I think we should split the comment into lines. A RBS comment has multi line contents, but a Rubydex comment only has single-line content.
I think I have an implementation for this. Will share it later.
There was a problem hiding this comment.
Do you mean splitting into multiple lines at the RBS parser level?
The challenge with splitting during indexing is when the comment's content includes a line break, which ends up requiring more careful parsing. E.g.:
# something \n
vinistock
left a comment
There was a problem hiding this comment.
Especially considering time zone differences, I would vote to move forward with this stack of PRs and we can revisit comment collection in a new one (to avoid blocking each other).
| } | ||
| } | ||
|
|
||
| fn collect_comments(comment_node: Option<CommentNode>) -> Vec<Comment> { |
There was a problem hiding this comment.
Do you mean splitting into multiple lines at the RBS parser level?
The challenge with splitting during indexing is when the comment's content includes a line break, which ends up requiring more careful parsing. E.g.:
# something \nThis adds visit_constant_node so top-level, qualified, and class-nested constants are indexed. Also extracts collect_comments to deduplicate comment collection across the class, module, and constant visitors.
ed6eba1 to
60b8df1
Compare
I'll move ahead and merge the stack. We can fix forward as needed |

One more step towards #87.
This PR adds
visit_constant_nodeso top-level, qualified, and class-nested constants are indexed.Also extracts
collect_commentsto deduplicate comment collection across visitors, as suggested in #606 (comment), and movesassert_def_comments_eq!to the shared test macros inlocal_graph_test.