It looks like the parser is attempting to parse an AssignmentExpression as the body of the first arrow function - but I'll have to step through to see why it's not picking up the second one. It might be due to an optimisation that tries to skip over blocks when they're not being executed.
Worth noting that x=>{ return (y)=>0 } works fine.
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
Thanks for this - I've just filed an issue at https://github.com/espruino/Espruino/issues/2067
It looks like the parser is attempting to parse an AssignmentExpression as the body of the first arrow function - but I'll have to step through to see why it's not picking up the second one. It might be due to an optimisation that tries to skip over blocks when they're not being executed.
Worth noting that
x=>{ return (y)=>0 }
works fine.