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

Display a clear error on empty character literals '' #10197

Merged
merged 1 commit into from
Feb 5, 2021

Commits on Feb 5, 2021

  1. Display a clear error on empty character literals ''

    Before:
    > # '';;
    > Error: Syntax error
    
    After:
    > # '';;
    > Error: Illegal empty character literal ''
    >   Hint: Did you mean ' ' or a type variable 'a?
    
    Before, this input would get correctly lexed into QUOTE QUOTE and then
    fail in the parser with a generic "Syntax error" message. (Even if we
    had better error messages in the parser, here the parser-level error
    would not be very illuminating as ' is never the start of a valid
    expression or structure item).
    
    Fixes ocaml#10196.
    gasche committed Feb 5, 2021
    Configuration menu
    Copy the full SHA
    966d10c View commit details
    Browse the repository at this point in the history