Update lua TS queries for upstream parser change, fix #204

This commit is contained in:
Andy K. Massimino
2022-01-18 19:05:57 -05:00
parent 97ffd1a206
commit 43483d27bc
2 changed files with 6 additions and 9 deletions

View File

@@ -1,4 +1,4 @@
(for_in_statement
(for_statement
"do" @open.loop
"end" @close.loop) @scope.loop
@@ -11,13 +11,10 @@
(if_statement
"if" @open.if
"end" @close.if) @scope.if
(else "else" @mid.if.1)
(elseif "elseif" @mid.if.2)
(else_statement "else" @mid.if.1)
(elseif_statement "elseif" @mid.if.2)
(function
"function" @open.function
"end" @close.function) @scope.function
(local_function
(function_declaration
"function" @open.function
"end" @close.function) @scope.function
(function_definition

View File

@@ -142,9 +142,9 @@ function M.iter_prepared_matches(query, qnode, bufnr, start_row, end_row)
for id, node in pairs(match) do
local name = query.captures[id] -- name of the capture in the query
if name ~= nil then
local path = split(name..'.node')
local path = split(name .. ".node")
insert_to_path(prepared_match, path, node)
insert_to_path(prepared_match, split(name..'.metadata'), metadata)
insert_to_path(prepared_match, split(name .. '.metadata'), metadata)
end
end