mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
Merge pull request #16402 from clason/treesitter-bump
build(deps): bump tree-sitter,treesitter-c to v0.20.1 and adapt tests
This commit is contained in:
@@ -231,11 +231,11 @@ void ui_refresh(void)
|
||||
insert('char* astring = "\\n"; (1 + 1) * 2 != 2;')
|
||||
|
||||
local res = exec_lua([[
|
||||
cquery = vim.treesitter.parse_query("c", '((_) @plus (vim-match? @plus "^\\\\+$"))'..
|
||||
'((_) @times (vim-match? @times "^\\\\*$"))'..
|
||||
'((_) @paren (vim-match? @paren "^\\\\($"))'..
|
||||
'((_) @escape (vim-match? @escape "^\\\\\\\\n$"))'..
|
||||
'((_) @string (vim-match? @string "^\\"\\\\\\\\n\\"$"))')
|
||||
cquery = vim.treesitter.parse_query("c", '([_] @plus (#vim-match? @plus "^\\\\+$"))'..
|
||||
'([_] @times (#vim-match? @times "^\\\\*$"))'..
|
||||
'([_] @paren (#vim-match? @paren "^\\\\($"))'..
|
||||
'([_] @escape (#vim-match? @escape "^\\\\\\\\n$"))'..
|
||||
'([_] @string (#vim-match? @string "^\\"\\\\\\\\n\\"$"))')
|
||||
parser = vim.treesitter.get_parser(0, "c")
|
||||
tree = parser:parse()[1]
|
||||
res = {}
|
||||
@@ -321,7 +321,7 @@ void ui_refresh(void)
|
||||
insert('char* astring = "Hello World!";')
|
||||
|
||||
local res = exec_lua([[
|
||||
cquery = vim.treesitter.parse_query("c", '((_) @quote (vim-match? @quote "^\\"$")) ((_) @quote (lua-match? @quote "^\\"$"))')
|
||||
cquery = vim.treesitter.parse_query("c", '([_] @quote (#vim-match? @quote "^\\"$")) ([_] @quote (#lua-match? @quote "^\\"$"))')
|
||||
parser = vim.treesitter.get_parser(0, "c")
|
||||
tree = parser:parse()[1]
|
||||
res = {}
|
||||
|
||||
Reference in New Issue
Block a user