coalton-lang / coalton

Coalton is an efficient, statically typed functional programming language that supercharges Common Lisp.
https://coalton-lang.github.io/
MIT License
1.12k stars 68 forks source link

Improve presentation of low-level reader errors #1206

Closed jbouwman closed 4 days ago

jbouwman commented 1 month ago

Hard syntax errors like unterminated strings, unknown character literals, and so on will signal eclector conditions that are unhandled. For instance, an unterminated form results in:

Unhandled ECLECTOR.READER:UNTERMINATED-LIST in thread #<SB-THREAD:THREAD tid=259 "main thread" RUNNING
                                                         {7004FD0733}>:
  While reading list, expected the character ) when input ended.

Backtrace for: #<SB-THREAD:THREAD tid=259 "main thread" RUNNING {7004FD0733}>

Improve reader conditional handling so that a reasonable coalton source-error is signalled and printed instead, indicating file and character range for offending input.

jbouwman commented 4 days ago

Closed by #1209