mirror of
https://github.com/alda-lang/alda.git
synced 2026-03-03 18:23:36 +01:00
This provides filename/line/column context for any error I could possibly find. To achieve this, I made it so that all ScoreUpdates have source context, so when updating the score results in an error, we can print out the line and column number corresponding to the error. It's a bit more complicated than that, because score updates are nestable (e.g. event sequences can contain cram expressions can contain chords, etc.), which essentially gives us a stacktrace whenever a score update results in an error. I punted on giving the user the full stacktrace, in favor of doing something simpler and just showing the bottom-most error, because that's probably going to be the line and column number that's the most helpful.
4.6 KiB
4.6 KiB