-
-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve error message for missing closing tokens (#397)
When a missing closing token like `)`, `]` or `}` is encountered we want the "Expected `)`" error to point to a location one past the last valid token, not to the trailing error tokens. For example from #349 here's a poor error message from the existing code: ERROR: ParseError: # Error @ REPL[53]:15:5 ylims!(p, (0, last(ylims(p))) xlabel!(p, "Contig length cutoff (kbp)") # └─────────────────────────────────────┘ ── Expected `)` After this change, the error location instead points to the end of the last valid line: ERROR: ParseError: # Error @ REPL[53]:15:5 ylims!(p, (0, last(ylims(p))) # └── Expected `)`
- Loading branch information
Showing
3 changed files
with
16 additions
and
11 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