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

Underbracket placement #349

Closed
jariji opened this issue Aug 31, 2023 · 0 comments · Fixed by #397
Closed

Underbracket placement #349

jariji opened this issue Aug 31, 2023 · 0 comments · Fixed by #397
Labels
error messages Better, more actionable diagnostics

Comments

@jariji
Copy link

jariji commented Aug 31, 2023

ERROR: ParseError:
# Error @ REPL[53]:15:5
    ylims!(p, (0, last(ylims(p)))
    xlabel!(p, "Contig length cutoff (kbp)")
#   └─────────────────────────────────────┘ ── Expected `)`

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 ).

@c42f c42f added the error messages Better, more actionable diagnostics label Nov 9, 2023
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 c42f closed this as completed in #397 Dec 5, 2023
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
Labels
error messages Better, more actionable diagnostics
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants