fix(grammar): make brace and keyword separately queryable

This commit is contained in:
2026-05-17 06:00:21 +02:00
parent 218d2869a6
commit 6f4a0df871
7 changed files with 716 additions and 522 deletions
+18
View File
@@ -9,8 +9,10 @@ Simple block
(template
(content)
(block_open
(block_keyword)
(block_name))
(block_close
(block_keyword)
(block_name))
(content))
@@ -25,12 +27,14 @@ Block with content
(template
(content)
(block_open
(block_keyword)
(block_name))
(content)
(variable
(variable_name))
(content)
(block_close
(block_keyword)
(block_name))
(content))
@@ -45,14 +49,18 @@ Nested blocks
(template
(content)
(block_open
(block_keyword)
(block_name))
(block_open
(block_keyword)
(block_name))
(variable
(variable_name))
(block_close
(block_keyword)
(block_name))
(block_close
(block_keyword)
(block_name))
(content))
@@ -67,6 +75,7 @@ Block with one attribute
(template
(content)
(block_open
(block_keyword)
(block_name)
(attributes
(attribute
@@ -75,6 +84,7 @@ Block with one attribute
(variable
(variable_name))
(block_close
(block_keyword)
(block_name))
(content))
@@ -89,6 +99,7 @@ Block with multiple attributes
(template
(content)
(block_open
(block_keyword)
(block_name)
(attributes
(attribute
@@ -98,6 +109,7 @@ Block with multiple attributes
(attribute_name)
(attribute_value))))
(block_close
(block_keyword)
(block_name))
(content))
@@ -112,8 +124,10 @@ Case insensitive block keyword
(template
(content)
(block_open
(block_keyword)
(block_name))
(block_close
(block_keyword)
(block_name))
(content))
@@ -128,12 +142,16 @@ Conditional block
(template
(content)
(block_open
(block_keyword)
(block_name))
(block_open
(block_keyword)
(block_name))
(content)
(block_close
(block_keyword)
(block_name))
(block_close
(block_keyword)
(block_name))
(content))