diff options
author | Ben Bridle <ben@derelict.engineering> | 2025-03-08 14:22:38 +1300 |
---|---|---|
committer | Ben Bridle <ben@derelict.engineering> | 2025-03-08 14:22:53 +1300 |
commit | 869d9b4b9c6f5d095084c851af33d8590bd3edee (patch) | |
tree | af5c427178868121aee2cd32af892a98a1c21ba0 /src/lib.rs | |
parent | f9537f8109ca6976a97d88acd0d48dd600f4844d (diff) | |
download | assembler-869d9b4b9c6f5d095084c851af33d8590bd3edee.zip |
Show an error when a source file fails to parse
Previously, if a source file failed to parse, no symbols would be
returned and symbol resolution would continue as normal. This would
obscure the source of any errors, as well as the fact that any error
had occurred at all.
We don't want all errors in all source files to be printed at symbol
resolution time, because this could bury any errors in the actual
program being assembled with potentially irrelevant library errors,
and errors in the program being assembled will be printed all over
again once a merged source file has been produced.
Instead, we allow the parser function to return a None value if the
file could not be parsed, and a single line is printed as a warning
for every library file that failed to parse.
Diffstat (limited to 'src/lib.rs')
0 files changed, 0 insertions, 0 deletions