Open jeandrek opened 8 years ago
Your example is actually not a valid program because of ASI. It's actually getting parsed as:
syntax fn = function (ctx) {
let args = ctx.next().value;
let body = ctx.next().value;
return #`function ${args} ${body}`;
}(fn () {
return 42;
})
Add the necessary ;
and everything works out fine (yet another nail in the coffin of semicolon-less style).
That said I'm leaving this issue open so we can make a better error message. It should be able to say the {
at (fn () { ...
is invalid.
Oh, thanks.
When I enter
into the online editor I get this error message:
I'm using Firefox Nightly version 49.0a1.