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

[Swift] Fix parse-cancellation in BailErrorStrategy. #2123

Merged
merged 1 commit into from
Nov 29, 2017

Commits on Nov 11, 2017

  1. [Swift] Fix parse-cancellation in BailErrorStrategy.

    BailErrorStrategy is supposed to throw an error that's different from
    the ordinary recognition error, specifically so that it can be handled
    differently by client code.  This was not ported over from Java correctly.
    
    Fix this by moving parseCancellation from ANTLRError to ANTLRException,
    adding its RecognitionException argument, and throwing it from the
    two handlers in BailErrorStrategy.
    
    Also remove ANTLRException.cannotInvokeStartRule, which is unused.
    (The Java runtime uses it when ParseTreePatternMatcher throws a generic
    exception, but we don't have that.)
    ewanmellor committed Nov 11, 2017
    Configuration menu
    Copy the full SHA
    eb9124f View commit details
    Browse the repository at this point in the history