Commit Graph

25 Commits

Author SHA1 Message Date
anderoonies
55be77be69 discard block comments delimited with /* */ 2020-10-15 12:42:53 -04:00
ISSOtm
5a65188ca9 Implement compact file stacks in object files
Gets rid of `open_memstream`, enabling Windows compatibility again
Also fixes #491 as a nice bonus!
2020-10-04 04:46:01 +02:00
ISSOtm
7c895f8a1b Fix diagnostic formatting
Missing colon and space after the file stack
2020-10-04 04:38:53 +02:00
ISSOtm
4c9a929a14 Implement almost all functionality
Add keywords and identifiers
Add comments
Add number literals
Add strings
Add a lot of new tokens
Add (and clean up) IF etc.
Improve reporting of unexpected chars / garbage bytes
Fix bug with and improved error messages when failing to open file
Add verbose-level messages about how files are opened
Enforce that files finish with a newline
Fix chars returned not being cast to unsigned char (may conflict w/ EOF)
Return null path when no file is open, rather than crash
Unify and improve error printing slightly

Known to be missing: macro expansion, REPT blocks, EQUS expansions
2020-10-04 04:38:50 +02:00
ISSOtm
6dc4ce6599 Implement infrastructure around new lexer
The lexer itself is very much incomplete, but this is intended to be a
safe point to revert to should further implementation go south.
2020-10-04 04:37:58 +02:00
ISSOtm
4cfed3c98f Rewrite charmap system
Avoid allocating a *ton* of data per charmap
Stop relying on uninitialized data in charmap nodes
Only initialize charmap nodes lazily
2020-10-04 04:31:10 +02:00
ISSOtm
a1286e6f0e Make newlines explicit in error messages
In preparation for a change a PR is about to make
2020-09-27 10:54:06 +02:00
Antonio Niño Díaz
daf780c7e6 Refactor warning array for clarity 2020-08-04 22:28:56 +01:00
ISSOtm
8e92383fa3 Enable -Wobsolete by default
The fact that deprecations were common and quickly acted upon was raised by
some users
2020-07-21 21:06:48 +02:00
James Larrowe
bdf397bba7 Add empty data directive warning
Fixes #516
2020-05-06 09:50:28 -04:00
ISSOtm
5fe3a0adb6 Remove non-OPT options from Options struct 2020-04-13 17:15:00 +02:00
ISSOtm
cb0a882a31 Order warnings alphabetically 2020-03-23 16:03:36 +01:00
ISSOtm
fb58166e5d Add assertions
Closes #292
2020-03-21 23:00:38 +01:00
ISSOtm
28473d314a Make implicit truncation a warning 2020-02-05 13:20:51 +01:00
ISSOtm
b11d121c48 Remove undefined behavior from shifts
`asl` and `asr` in `src/link/patch.c` courtesy of @pinobatch, and rearranged in RGBASM
evaluators.
2020-01-28 12:37:38 +01:00
ISSOtm
4fe44447a2 Add license headers where missing 2020-01-19 11:11:36 +01:00
ISSOtm
2c37a1e971 Fix default warning states
They were in the wrong order for some reason, this especially caused user
warnings to be off by default
2020-01-16 19:16:54 +01:00
ISSOtm
b30dfb166b Fix a line over 80 chars 2019-12-08 00:08:44 +01:00
ISSOtm
36db3257f3 Align fatalerror return code with every other one 2019-12-08 00:07:48 +01:00
ISSOtm
b62832e94d Move empty entries warning to -Wextra
Since the behavior actually kinda makes sense, it's better as extra.
2019-12-07 02:48:06 +01:00
ISSOtm
f710f21ad8 Reorder warnings alphabetically 2019-12-06 12:06:21 +01:00
ISSOtm
90fefb468b Remove user warnings from -Wall
It does not make sense to include it there, as it's enabled by default.
2019-12-06 12:06:21 +01:00
ISSOtm
21f4cafef5 Make -Werror= with a meta warning an error
The previous behavior was to just enable the meta warning's warnings.
This is an error now because it doesn't make sense to do that, does it?
2019-12-06 12:06:21 +01:00
ISSOtm
ea003487aa Use trap_ instead of abort() for consistency 2019-11-23 21:59:36 +01:00
ISSOtm
191ee4ba1f Add support for toggleable warnings 2019-11-18 20:45:21 +01:00