Bypass checks which disable Fennel friendly compiler errors. #2140
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In Fennel 1.3.0, it checks to see whether
_G.io.read
exists before proceeding with friendly compiler error messages, because it used to have to read the source from disk in order to provide these messages. That is no longer needed; it can use the source provided as a string, but the check for_G.io.read
was accidentally left in place.This change bypasses that check with a fake io table in order to get improved compiler error message and parse error reporting.
It should be removed once Fennel 1.3.1 or 1.4.0 is brought in.
We also set the error pinpointing characters to
>>
and<<
. In normal Fennel, these use ANSI escape codes to change the color when writing to the terminal, but TIC-80 does not support these escape codes. I think it would be better if we could change the color of just the portion of the line which in being pinpointed, but I don't think that's possible right now, so the arrows can be used instead.Here's a sample of how it looks in TIC, and one of how it looks in the terminal. The term version is a little nicer, but even so the TIC one is much better than what it was before.
(This looks like it's related to #1970 but that one is for runtime errors and this one is for compile-time errors.)