mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-02 03:26:52 -04:00
refactor(all): language tree adaption (#1105)
This commit is contained in:
parent
0df7c4aa39
commit
6863f79118
9 changed files with 198 additions and 61 deletions
|
|
@ -166,4 +166,16 @@ function M.difference(tbl1, tbl2)
|
|||
end)
|
||||
end
|
||||
|
||||
function M.identity(a)
|
||||
return a
|
||||
end
|
||||
|
||||
function M.constant(a)
|
||||
return function() return a end
|
||||
end
|
||||
|
||||
function M.to_func(a)
|
||||
return type(a) == 'function' and a or M.constant(a)
|
||||
end
|
||||
|
||||
return M
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue