-
Notifications
You must be signed in to change notification settings - Fork 19
feat(grammar): support "trim" for script heredocs #41
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
feat(grammar): support "trim" for script heredocs #41
Conversation
|
Worth it for the scanner simplifications alone. (Be advised that this parser is not in a great shape and in sore need of a massive rework -- especially the scanner -- before you put more work into it.) Needs a rebase now -- and if this affects queries, please make the appropriate changes in the same PR so I can cherry-pick them for nvim-treesitter (and then Neovim). |
6ca9daf to
506bca6
Compare
|
Meaning, should the |
|
I don't think it affects queries. There's a new child node for |
|
It's not breaking, but you presumably added it to give it syntax highlighting? |
|
I added it so the parsing didn't break and cause the rest of my vim file to go un-highlighted. :) I'll look into having it highlighted the same way as the |
|
If in doubt, |
Allow the optional "trim", as documented in ":help :lua-heredoc". This removes the need for try_lex_heredoc_marker()'s `is_let_heredoc` parameter since both script and let heredocs can have a parameter.
506bca6 to
e571d68
Compare
|
I used |
|
Hmm, good question. I don't even know what this does. |
|
Yeah, probably should be |
Allow the optional "trim", as documented in ":help :lua-heredoc".
This removes the need for try_lex_heredoc_marker()'s
is_let_heredocparameter since both script and let heredocs can have a parameter.