Closed nfejzic closed 1 month ago
tree-sitter --version
No response
The latest release (0.23) broke the parsing of doc-comments. Here's an example of how it looks like right now:
It should look like the following (as in release 0.21.2):
I don't know the specific commit that broke this. However, the issue is present from commit 7de6a3bc1ba213424c137f134d2872975b3b7fbe forwards.
7de6a3bc1ba213424c137f134d2872975b3b7fbe
I'm using neovim (v0.10.0) with nvim-treesitter plugin.
nvim-treesitter
Here's the tree of the wrongly parsed part:
(source_file ; [0, 0] - [7, 0] (line_comment ; [0, 0] - [1, 0] outer: (outer_doc_comment_marker) ; [0, 2] - [0, 3] doc: (doc_comment)) ; [0, 3] - [1, 0] (function_item ; [1, 0] - [3, 1] name: (identifier) ; [1, 3] - [1, 7] parameters: (parameters) ; [1, 7] - [1, 9] body: (block ; [1, 10] - [3, 1] (line_comment ; [2, 4] - [3, 0] inner: (inner_doc_comment_marker) ; [2, 6] - [2, 7] doc: (doc_comment))))) ; [2, 7] - [3, 0]
///
//!
The /// symbol should be parsed as one symbol.
/// This is a doc comment fn main() { //! this is inside function comment }
Came here since I'm having the same issue
Highlights are implementation-dependent and are not controlled here. The parse tree is correct, this is the parser repo.
@amaanq Thank you for the info 🙏🏻
Did you check existing issues?
Tree-Sitter CLI Version, if relevant (output of
tree-sitter --version
)No response
Describe the bug
The latest release (0.23) broke the parsing of doc-comments. Here's an example of how it looks like right now:
It should look like the following (as in release 0.21.2):
I don't know the specific commit that broke this. However, the issue is present from commit
7de6a3bc1ba213424c137f134d2872975b3b7fbe
forwards.I'm using neovim (v0.10.0) with
nvim-treesitter
plugin.Here's the tree of the wrongly parsed part:
Steps To Reproduce/Bad Parse Tree
///
and//!
symbols of doc comments are parsed wrong, with third character parsed as operator (I think?)Expected Behavior/Parse Tree
The
///
symbol should be parsed as one symbol.Repro