Closed hildjj closed 1 year ago
Parens also create a location()
context.
I figured I'd fix 398 while I was in there.
Oh, BTW, do you remember when it was introduced? I remember at least old versions of PEG.js didn't have this kind of scoping.
Probably in 2.0. It's been in for a while, but definitely after we forked.
Thanks!
It was one of the larger improvements to DX, but I didn't know it happened after the fork.
It was technically after the fork, because we forked from the last-known-good spot, then the plucks were back-ported from head -- because that was the feature I wanted to be released enough to want the fork. :)
It's not clear from the docs that this is legal:
because the parens create a new context for returns. Same with the old way: