aboutsummaryrefslogtreecommitdiff
path: root/runtime/lua/vim/treesitter/query.lua
diff options
context:
space:
mode:
authorLewis Russell <lewis6991@gmail.com>2023-07-18 15:42:30 +0100
committerGitHub <noreply@github.com>2023-07-18 15:42:30 +0100
commitbe74807eef13ff8c90d55cf8b22b01d6d33b1641 (patch)
tree9f7e1cebdb2677057b066df9fea91bce86b4ab6a /runtime/lua/vim/treesitter/query.lua
parentd0ae529861594b2e89a436ed2cfb3d2243f8bfcc (diff)
downloadrneovim-be74807eef13ff8c90d55cf8b22b01d6d33b1641.tar.gz
rneovim-be74807eef13ff8c90d55cf8b22b01d6d33b1641.tar.bz2
rneovim-be74807eef13ff8c90d55cf8b22b01d6d33b1641.zip
docs(lua): more improvements (#24387)
* docs(lua): teach lua2dox how to table * docs(lua): teach gen_vimdoc.py about local functions No more need to mark local functions with @private * docs(lua): mention @nodoc and @meta in dev-lua-doc * fixup! Co-authored-by: Justin M. Keyes <justinkz@gmail.com> --------- Co-authored-by: Justin M. Keyes <justinkz@gmail.com>
Diffstat (limited to 'runtime/lua/vim/treesitter/query.lua')
-rw-r--r--runtime/lua/vim/treesitter/query.lua9
1 files changed, 0 insertions, 9 deletions
diff --git a/runtime/lua/vim/treesitter/query.lua b/runtime/lua/vim/treesitter/query.lua
index 7610ef7b7f..08186468a5 100644
--- a/runtime/lua/vim/treesitter/query.lua
+++ b/runtime/lua/vim/treesitter/query.lua
@@ -15,7 +15,6 @@ Query.__index = Query
---@class TSQueryModule
local M = {}
----@private
---@param files string[]
---@return string[]
local function dedupe_files(files)
@@ -33,7 +32,6 @@ local function dedupe_files(files)
return result
end
----@private
local function safe_read(filename, read_quantifier)
local file, err = io.open(filename, 'r')
if not file then
@@ -44,7 +42,6 @@ local function safe_read(filename, read_quantifier)
return content
end
----@private
--- Adds {ilang} to {base_langs}, only if {ilang} is different than {lang}
---
---@return boolean true If lang == ilang
@@ -153,7 +150,6 @@ function M.get_files(lang, query_name, is_included)
return query_files
end
----@private
---@param filenames string[]
---@return string
local function read_query_files(filenames)
@@ -335,7 +331,6 @@ local predicate_handlers = {
['match?'] = (function()
local magic_prefixes = { ['\\v'] = true, ['\\m'] = true, ['\\M'] = true, ['\\V'] = true }
- ---@private
local function check_magic(str)
if string.len(str) < 2 or magic_prefixes[string.sub(str, 1, 2)] then
return str
@@ -624,12 +619,10 @@ function M.list_predicates()
return vim.tbl_keys(predicate_handlers)
end
----@private
local function xor(x, y)
return (x or y) and not (x and y)
end
----@private
local function is_directive(name)
return string.sub(name, -1) == '!'
end
@@ -700,7 +693,6 @@ end
--- Returns the start and stop value if set else the node's range.
-- When the node's range is used, the stop is incremented by 1
-- to make the search inclusive.
----@private
---@param start integer
---@param stop integer
---@param node TSNode
@@ -750,7 +742,6 @@ function Query:iter_captures(node, source, start, stop)
start, stop = value_or_node_range(start, stop, node)
local raw_iter = node:_rawquery(self.query, true, start, stop)
- ---@private
local function iter()
local capture, captured_node, match = raw_iter()
local metadata = {}