Can't transcribe a repeater that contains delims more than once.
Created by: natefaubion
macro test {
rule { ($foo ...) } => {
var a = $foo ...;
var b = $foo ...;
}
}
test([1, 2, 3])
TypeError: Cannot read property 'inner' of undefined
This is because the same delim reference gets spit out twice. When expandTermTreeToFinal gets around to it the second time around, the inner tokens are already mutated into terms. It throws the error when calling expose (which obviously does not work with terms).
This could probably be fixed on either the expandTermTreeToFinal by not mutating, or on the transcribe side by deep cloning. I think the transcribe side would be simpler, but maybe there are more bugs lurking by mutating in expandTermTreeToFinal?