File: tstree.lua

package info (click to toggle)
neovim 0.11.5-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 64,140 kB
  • sloc: ansic: 263,427; python: 1,472; lisp: 1,237; sh: 1,138; makefile: 383; xml: 84; ruby: 6
file content (45 lines) | stat: -rw-r--r-- 1,282 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
---@meta
-- luacheck: no unused args
error('Cannot require a meta file')

--- @brief A "treesitter tree" represents the parsed contents of a buffer, which can be
--- used to perform further analysis. It is a |userdata| reference to an object
--- held by the treesitter library.
---
--- An instance `TSTree` of a treesitter tree supports the following methods.

---@nodoc
---@class TSTree: userdata
local TSTree = {} -- luacheck: no unused

--- Return the root node of this tree.
---@return TSNode
function TSTree:root() end

-- stylua: ignore
---@param start_byte integer
---@param end_byte_old integer
---@param end_byte_new integer
---@param start_row integer
---@param start_col integer
---@param end_row_old integer
---@param end_col_old integer
---@param end_row_new integer
---@param end_col_new integer
---@return TSTree
---@nodoc
function TSTree:edit(start_byte, end_byte_old, end_byte_new, start_row, start_col, end_row_old, end_col_old, end_row_new, end_col_new) end

--- Returns a copy of the `TSTree`.
---@return TSTree
function TSTree:copy() end

---@param include_bytes true
---@return Range6[]
---@nodoc
function TSTree:included_ranges(include_bytes) end

---@param include_bytes false
---@return Range4[]
---@nodoc
function TSTree:included_ranges(include_bytes) end