WIP: awesomerc.tl
should work #85
|
@ -95,7 +95,14 @@ local function merge_nodes(node: Node, other: Node): Node
|
|||
end
|
||||
|
||||
-- Children should be merged
|
||||
local children: { string : integer } = {}
|
||||
for i, child in ipairs(node.children) do
|
||||
children[child.name] = i
|
||||
end
|
||||
for _, child in ipairs(other.children) do
|
||||
if children[child.name] ~= nil then
|
||||
table.remove(node.children, children[child.name])
|
||||
end
|
||||
table.insert(node.children, child)
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue