Closed msujew closed 1 year ago
Thanks for looking into the performance numbers as part of this PR. I will try to review it on the weekend. Worse case it should be reviewed on the upcoming holidays (next weekend)
@bd82 Thanks for your review. I've incorporated your comments (and left a comment where I had something to add to your comment). I agree, having an experimental
namespace sounds good to me for faster iterations on the feature 👍
Hi @msujew
I think some of the code that was removed actually does have a purpose (see comments above). Once you do so I will:
And in a different PR I will:
maxLookahead
param.@bd82 I came back from vacation and integrated your comment. Good to know that the code does serve a purpose :D
Anyway, hopefully this should be good to go now.
Supersedes and closes https://github.com/Chevrotain/chevrotain/pull/1793
Allows users to supplement the parser with their own lookahead strategy. Mostly introduces new interfaces to override the existing lookahead builder functions and exposes some internals (such as
getLookaheadPaths
). The latter is necessary, as most lookahead strategy will still try to perform LL(k) style lookahead in one way or another. For example LL(*) needs it to identify LL(1) decisions.The PR contains some minor updates to the documentation on this. Once this is merged and TypeFox/Langium releases their LL(*) lookahead strategy, I would update it with a reference.
Since this is basically just restructuring existing code, it wasn't necessary to write tests for it. Instead the
ecma_quirks.ts
tests were adapted to make use of the new API, providing an integration test for this feature.The changes seem to have absolutely no impact on performance: