[ elab ] Print script's FC in the bad elaboration script error #3079
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.
Description
When you are writing (and running) elaborator scripts, occasionally you can get the
Bad elaborator script
error. Pretty long time ago I suggested a PR that added this bad elaborator script to the error output, and it helped a lot, but required some custom and thought on what's going on. Today, I had such an error with a mystical output, and I thought that printing the position of where the compiler thinks there is a problem is good.So, I suggest to print not only
FC
of the call to the script, but also anFC
of a position in a script, which cause theBad elaborator script
error itself (it it is present, surely).One can see in the added test how the error can look like with this change.