diff options
| author | Christoph Sax <christoph.sax@mailbox.org> | 2023-09-13 20:54:04 +0200 |
|---|---|---|
| committer | Christian Clason <c.clason@uni-graz.at> | 2023-09-14 20:07:02 +0200 |
| commit | 5ec42175676bc4e6248b8ca9603acbc86497c68e (patch) | |
| tree | e94432a716f72782fc8205625279daac00fd1523 /queries | |
| parent | Update parsers: t32, wing (diff) | |
| download | nvim-treesitter-5ec42175676bc4e6248b8ca9603acbc86497c68e.tar nvim-treesitter-5ec42175676bc4e6248b8ca9603acbc86497c68e.tar.gz nvim-treesitter-5ec42175676bc4e6248b8ca9603acbc86497c68e.tar.bz2 nvim-treesitter-5ec42175676bc4e6248b8ca9603acbc86497c68e.tar.lz nvim-treesitter-5ec42175676bc4e6248b8ca9603acbc86497c68e.tar.xz nvim-treesitter-5ec42175676bc4e6248b8ca9603acbc86497c68e.tar.zst nvim-treesitter-5ec42175676bc4e6248b8ca9603acbc86497c68e.zip | |
fix(t32): update indent queries & test
The latest release of the grammar changes the handling of consecutive
line breaks. This breaks the existing test for indents.
This commit updates the indent queries and fixes the associated test.
Diffstat (limited to 'queries')
| -rw-r--r-- | queries/t32/indents.scm | 22 |
1 files changed, 4 insertions, 18 deletions
diff --git a/queries/t32/indents.scm b/queries/t32/indents.scm index 64ee3f571..b30b916d2 100644 --- a/queries/t32/indents.scm +++ b/queries/t32/indents.scm @@ -1,28 +1,15 @@ -; Subroutines & scoping (block ")" @indent.branch .) @indent.begin +(if_block) @indent.begin -; Control flow statements -( - (if_block - condition: (_) - . (_) @_then) @indent.begin - (#not-has-type? @_then block) -) +(if_block + (block)) @indent.dedent (else_block) @indent.branch (else_block - (if_block) @indent.dedent) @indent.branch - -( - (else_block - (if_block - condition: (_) - . (_) @_then)) @indent.branch - (#not-has-type? @_then block) -) + (if_block) @indent.dedent) (while_block (command_expression)) @indent.auto @@ -30,5 +17,4 @@ (repeat_block (command_expression)) @indent.auto - (comment) @indent.auto |
