better_panics #15

Merged
scott merged 5 commits from better_panics into main 2023-12-18 05:26:58 +00:00
Owner

Panic is now a form rather than a function: panic! {expr} instead of panic! (:msg). This allows the interpreter to attach a line number to panics.

Also, it doesn't make that much sense for it to be a function, since it stops the world.

Also also, this pull request fully fixes (I think) the bugs in line numbers with error reporting, whereby a panic is looking for a line number in the source of the script being executed, rather than in the script where the panic is found. Tokens now carry :source and :input fields that error.cljc plucks for reporting.

Panic is now a form rather than a function: `panic! {expr}` instead of `panic! (:msg)`. This allows the interpreter to attach a line number to panics. Also, it doesn't make that much sense for it to be a function, since it stops the world. Also also, this pull request fully fixes (I think) the bugs in line numbers with error reporting, whereby a panic is looking for a line number in the source of the script being executed, rather than in the script where the panic is found. Tokens now carry `:source` and `:input` fields that `error.cljc` plucks for reporting.
scott added 5 commits 2023-12-18 05:26:52 +00:00
scott merged commit 34f9a08bd6 into main 2023-12-18 05:26:58 +00:00
Sign in to join this conversation.
No description provided.