What is (or are) the parsing techniques used in acorn?

Sorry if this is a dumb question, but I’m curious about the parsing techniques used by acorn (in a broad sense).

Is it a hand written/recursive descent parser? Is it LR, LALR?

Thanks in advance!

Yes, this. With some awkward tricks to deal with modern JS’s non-LL(1) nature (things like parenthesized expressions and arrow functions looking similar until you get to the arrow).

1 Like