Fixed source start position for foldr trees (e.g. IndexChain)

This commit is contained in:
Bruce Hill 2019-01-19 18:38:28 -08:00
parent 14f3ad993e
commit 6ffd38b511
2 changed files with 2 additions and 2 deletions

View File

@ -10,7 +10,7 @@ foldr = function(...)
assert(inner.type) assert(inner.type)
local outer = select(i, ...) local outer = select(i, ...)
table.insert(outer, 1, inner) table.insert(outer, 1, inner)
inner.start = outer.start outer.source.start = inner.source.start
inner = outer inner = outer
end end
assert(inner.type) assert(inner.type)

View File

@ -11,7 +11,7 @@ foldr = (...)->
assert inner.type assert inner.type
outer = select(i,...) outer = select(i,...)
table.insert(outer, 1, inner) table.insert(outer, 1, inner)
inner.start = outer.start outer.source.start = inner.source.start
inner = outer inner = outer
assert inner.type assert inner.type
return inner return inner