-
-
Notifications
You must be signed in to change notification settings - Fork 177
Tree-sitter rolling fixes, 1.131.0 edition #1377
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
base: master
Are you sure you want to change the base?
Conversation
…and add support for multi-line string literals.
…by allowing `@fold.end` captures to be adjusted with fold predicates.
tree-sitter-java…|
Updated this PR to add a fix for a Python folding issue. The query syntax is quite constraining in certain situations, and the “node position descriptor” concept I came up with was ultimately a kludge. Partially because of limitations in I'll remedy that in the future when I write new, more useful query predicates. For now, though, I can fix this with just a small feature addition to fold captures. Added new specs for everything! |
|
GitHub is having issues with accessing raw file content, according to their status page, so that's likely why CI failed. I'll try it again later. |
…er-java-fix-multiline-strings
…of a template string interpolation.
EDIT: Found another Tree-sitter change worth making, so I've retroactively turned this into the “rolling fixes” PR for the upcoming version. Original description follows.
[language-java] Update to latest
tree-sitter-java……and add support for multi-line string literals.
Fixes #1376.
We hadn't updated the
tree-sitter-javaparser in a long time. After I confirmed that the latest version of the parser does support the multi-line string literals mentioned in #1376, I took this opportunity to bump our parser version.Doing so added recognition of multi-line strings, but also introduced some incompatibilities in the query files having to do with renamed nodes, so that took a little while to fix.
As is my habit when I touch
language-*packages, I've introduced a grammar test file to prove that these changes work. It's bare-bones right now, but it does test the multi-line string literals.As for the other changes to the query files: those were necessary to get the Tree-sitter grammar to do anything at all, since it would've thrown an error during activation if there were any invalid syntax in a query file. Therefore if I'd done any of that wrong, or missed anything, CI would catch it because it would result in all these new grammar tests failing outright.
(I'm in a weird state because I'm submitting these PRs blind! They're against master (still running Electron 12), but my local Pulsar.app is the Electron 30 release candidate. So I'm making these changes in my Electron 30 codebase, verifying they work, then copying them over to my Electron 12 codebase and opening the PR from there. Luckily, there's nothing about the Tree-sitter infrastructure that even needed to change when we bumped to Electron 30 — the upside of all of that stuff using WebAssembly instead of native bindings in Node.)