node: swap_children and swap_children_at functions

This commit is contained in:
BlackMATov
2020-04-22 10:25:02 +07:00
parent db99cd71d3
commit 3f8bb69955
6 changed files with 137 additions and 22 deletions

View File

@@ -124,6 +124,23 @@ function node.add_sibling_after(self, sibling) end
---@return boolean
function node.remove_child(self, child) end
---@param self node
---@param index integer
---@return node
function node.remove_child_at(self, index) end
---@param self node
---@param child_l node
---@param child_r node
---@return boolean
function node.swap_children(self, child_l, child_r) end
---@param self node
---@param child_l integer
---@param child_r integer
---@return boolean
function node.swap_children_at(self, child_l, child_r) end
---@param self node
---@return boolean
function node.send_backward(self) end
@@ -150,10 +167,5 @@ function node.child_at(self, index) end
---@return integer, boolean
function node.child_index(self, child) end
---@param self node
---@param index integer
---@return node
function node.remove_child_at(self, index) end
---@type node
_G.node = _G.node or node