tstree.lua (1282B)
1 ---@meta 2 -- luacheck: no unused args 3 error('Cannot require a meta file') 4 5 --- @brief A "treesitter tree" represents the parsed contents of a buffer, which can be 6 --- used to perform further analysis. It is a |userdata| reference to an object 7 --- held by the treesitter library. 8 --- 9 --- An instance `TSTree` of a treesitter tree supports the following methods. 10 11 ---@nodoc 12 ---@class TSTree: userdata 13 local TSTree = {} -- luacheck: no unused 14 15 --- Return the root node of this tree. 16 ---@return TSNode 17 function TSTree:root() end 18 19 -- stylua: ignore 20 ---@param start_byte integer 21 ---@param end_byte_old integer 22 ---@param end_byte_new integer 23 ---@param start_row integer 24 ---@param start_col integer 25 ---@param end_row_old integer 26 ---@param end_col_old integer 27 ---@param end_row_new integer 28 ---@param end_col_new integer 29 ---@return TSTree 30 ---@nodoc 31 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 32 33 --- Returns a copy of the `TSTree`. 34 ---@return TSTree 35 function TSTree:copy() end 36 37 ---@param include_bytes true 38 ---@return Range6[] 39 ---@nodoc 40 function TSTree:included_ranges(include_bytes) end 41 42 ---@param include_bytes false 43 ---@return Range4[] 44 ---@nodoc 45 function TSTree:included_ranges(include_bytes) end