You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
maintainer of HiPhish/rainbow-delimiters.nvim here; I have a problem matching and properly highlighting parenthesized expressions. The problem is that all the parentheses of an expression are on the same level as their siblings. Consider the following query:
SELECT ((((1))));
It's a weird query, but at least in SQLite it is valid. The tree looks like this:
All the parentheses are on the same level, it is impossible to build up a tree of "containers" to determine the proper nesting. I propose a sort of parenthesized_expression node (or whatever name you consider more appropriate). With that node the term would have only one value:
Hello,
maintainer of HiPhish/rainbow-delimiters.nvim here; I have a problem matching and properly highlighting parenthesized expressions. The problem is that all the parentheses of an expression are on the same level as their siblings. Consider the following query:
It's a weird query, but at least in SQLite it is valid. The tree looks like this:
All the parentheses are on the same level, it is impossible to build up a tree of "containers" to determine the proper nesting. I propose a sort of
parenthesized_expression
node (or whatever name you consider more appropriate). With that node theterm
would have only onevalue
:Let's take another example:
The original tree:
How many
right
nodes can a binary expression reasonably have? Here is what it would look like withparenthesized_expression
:The text was updated successfully, but these errors were encountered: