Fix by Fabien. This fixes ">" and ">=" node duplication on weaving
-- regular weaving of chidren in the parent's sources --
local function weave (ast)
-- regular weaving of chidren in the parent's sources --
local function weave (ast)
+ -- sort children in appearence order
+ local comp = |a,b| a.lineinfo.first[3] < b.lineinfo.first[3]
+ table.sort (ast_children [ast], comp)
+
local li = ast.lineinfo
if not li then return synthetize (ast) end
local a, d = li.first[3], li.last[3]
for child in ivalues (ast_children [ast]) do
local li = child.lineinfo
local b, c = li.first[3], li.last[3]
local li = ast.lineinfo
if not li then return synthetize (ast) end
local a, d = li.first[3], li.last[3]
for child in ivalues (ast_children [ast]) do
local li = child.lineinfo
local b, c = li.first[3], li.last[3]
+ acc (src:sub (a, b - 1))
acc (translation [child])
acc (translation [child])
end
acc (src:sub (a, d))
end
end
acc (src:sub (a, d))
end