Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automatically track expected tokens while parsing #711

Merged
merged 1 commit into from
Oct 26, 2020
Merged

Automatically track expected tokens while parsing #711

merged 1 commit into from
Oct 26, 2020

Commits on Oct 26, 2020

  1. Automatically track expected tokens while parsing

    Remove all manual tracking of which tokens would have been accepted by
    the parser in favor of having the parser add tokens that it checks for
    to a set of expected tokens, clearing them when it accepts a token, and
    using the current contents of the set in error messages.
    
    This is a massive improvement, and will make the parser easier to
    modify going forward.
    
    And, this actually solves my sole issue with hand-written parsers.
    
    Thanks to matklad on reddit for suggesting this!
    casey committed Oct 26, 2020
    Configuration menu
    Copy the full SHA
    b5c2e13 View commit details
    Browse the repository at this point in the history