Add error list of some kind #12
Loading…
x
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Currently there is only one way to return a fatal error during any part of the assembling. We want to have some kind of error list that many/all stages of the assembler can use to push errors into. The error list should have enough context to print useful error messages.
Context wise it's probably enough to have a tokenlist entry along with a useful error message. Creating the tokenlist happens after the lexing stage, but lexer errors are already non-fatal so that should be okay, the lexer errors can be flagged when the tokens are added to the token list.
It's not yet clear to me when errors should be shown to the user. Presumably we want to show errors and fail after each stage is completed.
For parsing errors there's still #5 that needs to be explored. I suspect parsing can only really throw a single error unless there is a way to recover from parse failures by skipping tokens according to some heuristic.