Nice error reporting #36

Open
opened 2024-05-19 19:14:49 +00:00 by scott · 2 comments
Owner

Stand up a system of presenting errors from the scanner, parser, validator, and interpreter that are useful for users (and me!).

Do these things:

  • Write an errors.janet that's responsible for outputting nice errors

  • Produce the offending line

  • With a caret underneath that shows where the error is

  • And a more helpful (gentle) error message than what is produced in error objects

  • Add suggestions where helpful:

    • Suggest bound names with an unbound name error

    • Show actual place a name is bound one a name rebinding error

    • Show function arities with arity mismatch

    • Try to give a helpful reason for pattern mismatches

    • Trace a panic!'s return path (instead of a stack trace, which is erased with TCO)

Stand up a system of presenting errors from the scanner, parser, validator, and interpreter that are useful for users (and me!). Do these things: - [x] Write an `errors.janet` that's responsible for outputting nice errors - [x] Produce the offending line - [x] With a caret underneath that shows where the error is - [x] And a more helpful (gentle) error message than what is produced in error objects - [ ] Add suggestions where helpful: - [ ] Suggest bound names with an unbound name error - [ ] Show actual place a name is bound one a name rebinding error - [ ] Show function arities with arity mismatch - [x] Try to give a helpful reason for pattern mismatches - [ ] Trace a `panic!`'s return path (instead of a stack trace, which is erased with TCO)
scott added this to the Computer Class milestone 2024-05-19 19:14:49 +00:00
Author
Owner

Consider producing issues for each of these things

Consider producing issues for each of these things
scott added the
next
label 2024-05-19 19:24:57 +00:00
Author
Owner

On suggested names, this is what we want: https://en.wikipedia.org/wiki/Levenshtein_distance

On suggested names, this is what we want: https://en.wikipedia.org/wiki/Levenshtein_distance
scott self-assigned this 2024-05-29 19:12:51 +00:00
scott modified the milestone from Computer Class to 0.2.0 2024-06-06 03:05:16 +00:00
scott added this to the Better errors project 2024-07-03 00:19:54 +00:00
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: twc/ludus#36
No description provided.