Rangi42
c6d0e8de63
Improve some error messages
2025-07-24 11:19:04 -04:00
Rangi
7e151f16c3
Factor out a single PNG-reading function to encapsulate the libpng API ( #1765 )
2025-07-23 15:53:33 -04:00
Rangi42
2ce4cdbff6
Reduce deep nesting some more, including larger refactors to assign.cpp
2025-07-22 19:38:49 -04:00
Rangi42
eea532ded1
Make sectionMap not extern
2025-07-21 20:20:04 -04:00
Rangi42
c83b87e0a0
Make all non-extern globals static
2025-07-21 20:14:09 -04:00
Rangi42
8d268e8a8a
Initialize maxRecursionDepth with other options
2025-07-21 19:58:37 -04:00
Rangi42
ee0f311c10
Make nbErrors not extern
2025-07-21 19:49:08 -04:00
Rangi42
61730be6ce
Make failedOnMissingInclude not extern
2025-07-21 19:40:01 -04:00
Rangi42
5f333d9753
More refactoring around extern variables
2025-07-21 19:22:10 -04:00
Rangi42
d1493a9f96
Group extern RGBASM variables in an Options struct
2025-07-21 19:02:21 -04:00
Rangi42
9ef32e405c
Combine two places that did REPT chain printing
2025-07-20 15:16:53 -04:00
Rangi42
9e0e7ef9a1
Improve RGBASM test coverage
2025-07-20 13:13:45 -04:00
Rangi42
2dc948fefb
Miscellaneous refactoring
2025-07-20 12:28:59 -04:00
Rangi42
e3a5290dad
Restore blue-painting of macro arg expansions to prevent recursion
2025-07-20 11:53:36 -04:00
Rangi42
cfe1f60e47
Refactor peek() to use a loop instead of tail recursion
2025-07-20 11:38:26 -04:00
Rangi42
0eed237517
Refactor peeking at macro args to be like peeking at interpolations
2025-07-20 11:21:44 -04:00
Rangi42
68ffb01cac
Use nextChar() for shiftChar() and then peek()
2025-07-20 11:15:06 -04:00
Rangi42
169ac61e14
Rename nextChar to bumpChar in the RGBASM lexer for symmetry with std::filebuf in the RGBLINK lexer
2025-07-20 11:02:02 -04:00
Rangi42
0681110647
Refactor peek() some more
2025-07-20 10:59:35 -04:00
Rangi42
8d1b111692
Small lexer refactors, commenting when tail recursion occurs
2025-07-20 00:14:13 -04:00
Rangi
2935942667
Allow multiple preinclude files ( #1763 )
2025-07-19 17:07:15 -04:00
Rangi42
14f5e16ae8
Prefer pre-inc/dec unless post-inc/dec are necessary
2025-07-19 16:18:35 -04:00
Rangi42
bf69043a1d
Reduce deep nesting some more
2025-07-19 16:18:30 -04:00
Rangi
53c39d01d4
Implement READFILE function ( #1759 )
2025-07-18 18:27:52 -04:00
Rangi42
e7d63f5f6b
Refactor code that handles when included files are missing
...
- Single unified routine for erroring out or handling missing dependencies
- Single three-state enum instead of two Booleans for missing dependencies
(this causes `-MC` to imply `-MG` instead of needing `-MG -MC`)
- Functions than can miss included files return a Boolean for whether the
parser should `YYACCEPT` and exit
2025-07-18 14:03:23 -04:00
Rangi42
b80b30fba1
Ensure that INCBIN parameters are non-negative
2025-07-18 12:44:27 -04:00
Rangi
4c8724899b
Support SIZEOF(reg) to distinguish 8- and 16-bit registers ( #1758 )
2025-07-17 15:49:28 -04:00
Rangi
0c96234532
Use concrete types instead of auto when convenient and not redundant ( #1757 )
2025-07-17 14:59:51 -04:00
Rangi42
2720224890
Refactor parsing of ld hl, sp + e8
2025-07-15 21:52:22 -04:00
Rangi42
ee29579d3e
Reduce some more deep nesting
2025-07-15 17:41:32 -04:00
Rangi
1fecf80659
Implement 'character' literals ( #1747 )
2025-07-15 13:08:50 -04:00
Rangi
b6d77fbb9e
Implement BYTELEN and STRBYTE ( #1744 )
2025-07-14 21:46:35 -04:00
Rangi
8a19c5c30a
Fix string function behavior with NUL characters ( #1746 )
2025-07-14 21:43:32 -04:00
Rangi42
0149122cd0
Note how to print lexed token names for future reference
2025-07-14 10:25:47 -04:00
Rangi42
35335aadbe
Add test for labels when expecting symbols
2025-07-14 00:10:14 -04:00
Rangi42
80df858ee3
Clarify comment
2025-07-14 00:02:25 -04:00
Rangi42
eafc32fd68
Simplify switch with one case to if
2025-07-13 23:48:01 -04:00
Rangi42
2adeda0318
Use std::tie for sort comparator functions
2025-07-13 14:47:10 -04:00
Rangi42
21a6d35b8b
Simplify readString
2025-07-13 13:26:59 -04:00
Rangi42
ce78280af3
Simplify appendCharInLiteral
2025-07-13 13:22:40 -04:00
Rangi42
041b86b8dd
Use Defer instead of relying on a "Don't return before this" comment
2025-07-13 12:52:45 -04:00
Rangi42
da133baf17
Reduce nesting depth in lexer.cpp
2025-07-12 07:54:16 -04:00
Rangi42
d32b1912ed
Use verbosePrint in rgbasm as well as rgblink
2025-07-12 01:38:19 -04:00
Rangi42
82513e5255
Simplify appendCharInLiteral
2025-07-11 23:52:52 -04:00
Rangi42
f2708ce967
Consolidate readString and appendStringLiteral
2025-07-11 23:43:36 -04:00
Rangi42
01a5c94c7e
Factor out common code from readString and appendStringLiteral
2025-07-11 22:37:28 -04:00
Rangi
510a4aa99d
Add RGBASM -MC flag to continue -MG after missing dependency files ( #1687 )
2025-07-10 13:25:36 -04:00
Rangi42
276a200590
A few miscellaneous edits
2025-07-10 00:33:03 -04:00
Rangi
a40109e4e4
Update the UTF-8 decoder ( #1741 )
2025-07-09 23:13:30 -04:00
Rangi
34cf959c9d
Refactor to reduce nesting depth some more ( #1740 )
2025-07-09 22:46:40 -04:00