-
Notifications
You must be signed in to change notification settings - Fork 5
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
Draft: Move inline tokens to external scanner and split the grammar into two pieces #55
Conversation
Also add some fixes: - Arbitrary depth for headings - Allow paces around table separator - Support link reference definitions next to each other with arbitrary inline content.
There's real promise here!
Try to update package description a bit... Not sure about them really.
@treeman Can you explain what happened here? It looks like the |
And while I'm here:
|
Oh crap... I must've accidentally pushed the Anyway, this branch is should be stable and I've been using it for a few months without issues. Top-level But we should be able to make nvim-treesitter use the split parser approach (we need to update the grammars though). This should fix a bunch of bugs and hopefully be faster in some cases. |
Thank you!
Just do
Sure! Someone needs to make a PR to update the parsers and -- more importantly -- the queries, though. (And that someone has to be you, I'm afraid ;)) |
Also some refactoring
Solves different precedence issues for spans and links
The split parser is basically done. However after playing around with the bindings I realized that using a split parser gives a fairly negative user experience:
So I'll try to backport the fixes and features to the single grammar version. I don't know if I can do that in a good way but I want to try it before committing to the more awkward solution of multiple grammars. |
Complete rewrite of the inline parser together with many changes for the block parsing. Should make the parser follow the spec a lot closer in particular with inline precedence rules. #55
Closed in favor of #56 |
This is a major rewrite containing two large changes and many smaller improvements.
The biggest change is that it splits the parser in two (like tree-sitter-markdown) where two parsers must be used to parse a Djot file. This is a big breaking change as many capture groups have also changed so all query files needs to be updated.
The other big change is to let the external parser collect a stack of inline elements, solving a bunch of issues from the Djot spec (such as parsing
*not strong *strong*
properly).In the process I also fixed a bunch of other issues.
Closes #41, #42, #43, #44, #45, #46, #49, #50, #52, #53, #54