Skip to content

Improve unknown start of token error message for invisible characters #1016

@casey

Description

@casey

This came up because someone had a BOM in their justfile, which just was choking on.

The error message looked like:

error: Unknown start of token:
  |
1 | test:
  | ^

We should print the unknown start of token message such that invisible characters show up, for example by surrounding the offending character in quotes. We could also think about displaying non-printing characters as unicode escape sequences. Perhaps there's a function in the standard library that helps with that.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions