forked from ocaml/ocaml
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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.
- Loading branch information
Showing
3 changed files
with
14 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters