-
-
Notifications
You must be signed in to change notification settings - Fork 33
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
Underbracket placement #349
Labels
error messages
Better, more actionable diagnostics
Comments
c42f
added a commit
that referenced
this issue
Dec 5, 2023
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 `)`
c42f
added a commit
that referenced
this issue
Dec 5, 2023
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 `)`
c42f
added a commit
that referenced
this issue
Dec 6, 2023
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 `)`
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
On Slack it was pointed out that the underbracket ends unexpectedly early. If the last place a
)
could appear is after the final)
then that's where the┘
should be too -- right after the final)
.The text was updated successfully, but these errors were encountered: