Closed PeterJCLaw closed 2 years ago
Thanks, this looks promising. My PR is stable again, you can resolve the conflicts.
@PeterJCLaw if you update this branch with the latest in #93 and consider this PR ok to merge, then I'll probably merge it. No need for a full review here, that can be done within #93.
Thanks!
This introduces a new class which has the lazy-parsing behaviour, separate from
ASTTokens
, thus leavingASTTokens
semantics unchanged.ASTTokens
still learns how to handle nodes unmarked, however it is left somewhat cautious in the use of them. The new class instead prefers them wherever it can.This aims to provide an alternative to the API from #93 as the current API would make static analysis of
ASTTokens
much less useful when theinit_tokens
argument is used.While it looks like there's a lot of change here, there isn't -- most of the diff is moving functions to the top of the file.