Leading space fail#773
Conversation
|
|
||
| pub fn register<'a>(&mut self, node: tree_sitter::Node<'a>, position: usize) { | ||
| if SCOPE_BOUNDARIES.contains(&node.kind()) { | ||
| // The `program` root node is never registered directly, so the first node |
There was a problem hiding this comment.
Not sure. Might be this comment is too much and should be removed.
|
Thank you! @juleswritescode will take a look soon :) |
|
Hey there! Just took a look at this — do you have a real world scenario where this leads to a bug? I can't reproduce it by typing The reason I'm asking is that the treesitter context is best understood within the e.g. the Fixing it in the ScopeTracker seems like it's too low in the chain; other parts of the parser might still have trouble if there's a bug. |
|
To begin with, I have updated version of treesitter in my project - 0.26. Might be issue. I am investigating. |
|
Test in my fork branch without fix fails: https://github.com/gintsgints/postgres-language-server/tree/func_with_leading_space_fails Hope it is helpful. |
What kind of change does this PR introduce?
Bug fix
What is the current behavior?
Panic when procedure contains space after semicolon. Bug #769
What is the new behavior?
No Panic :)