Commit Graph

3196 Commits

Author SHA1 Message Date
Rangi42
d8aff148bb Factor out RRANGE macro like RANGE 2025-09-19 16:53:44 -04:00
Rangi
e31bcabbaa Implement === and !== string comparison operators (#1832) 2025-09-19 14:06:36 -04:00
Rangi
67741ab428 Trim left space from macro args, even past block comments (#1831) 2025-09-19 13:44:18 -04:00
Rangi
e0a6199f83 Allow charmap to map 'characters' as well as "strings" (#1830) 2025-09-16 12:51:07 +02:00
Rangi42
6cffd991f7 Document rgbasm -Wempty-data-directive
Fixes #1829
2025-09-15 09:44:50 -04:00
Rangi42
1fdeb34e50 Fix too-short .out.bin expected test results
RGBASM tests now use `rgblink -x` instead of `dd` to get trimmed
test output. RGBLINK tests cannot do so because some of them
(e.g. bank-numbers.asm and sizeof-startof.asm) rely on ROMX
sections above 1, and `-x` implies `-t` which breaks that.
2025-09-15 09:25:33 -04:00
Rangi42
9f16881d64 Use for-each loop 2025-09-10 21:18:33 -04:00
Rangi
223b3d1921 More accurate 8-bit <=> 5-bit RGB color conversion (#1827) 2025-09-08 15:13:25 -04:00
Rangi
65d408eb5d Document more about the RGBDS architecture (#1809) 2025-09-07 15:34:52 -04:00
ReiquelApplegate
3677ab2ebf Correct -q's arg name in rgbgfx(1) (#1826) 2025-09-07 18:28:37 +02:00
Rangi42
d404621e0d Don't silence strings-as-numbers with OPT Wno-obsolete in tests 2025-09-07 12:17:39 -04:00
Rangi42
c8a088f281 Avoid nonessential EQUS expansion in tests 2025-09-06 13:45:12 -04:00
Rangi42
94ed28acf8 Avoid nonessential strings-as-numbers in tests 2025-09-06 12:45:01 -04:00
Rangi42
00b5077b2a Make usage info output responsive to the terminal width 2025-09-05 21:58:17 -04:00
Rangi42
024b33b63a make format should apply to all .cpp and .hpp files 2025-09-05 21:05:58 -04:00
Rangi42
dcc10cebc3 Add test for duplicate section after use of fragment literal
Verifies that #1822 was fixed (by c6997fe73c)
2025-09-05 20:14:01 -04:00
Rangi42
1fc9ba86c4 Some RGBLINK refactoring
- Consistently refer to `Section` fragments/unions as "pieces" (renaming `.nextu`)
- Remove `Symbol`'s `.label()` accessors (use `std::get<Label>`)
- Move some `Label`-related logic into `Symbol` methods
2025-09-05 16:34:51 -04:00
Rangi42
e569e0c200 Don't comment "; Next fragment/union" in .map files for empty section pieces
Fixes #1821
2025-09-05 15:31:46 -04:00
Rangi42
f7fb3af615 Run make tidy with Checks: '-*,misc-include-cleaner' in .clang-tidy (IWYU) 2025-09-04 13:39:23 -04:00
Rangi42
1dfc1d3231 Factor out isBinDigit and parseHexDigit utility functions 2025-09-04 13:23:10 -04:00
Rangi42
891e6f98df Fix formatting of very long fixed-point numbers 2025-09-04 12:54:14 -04:00
Rangi42
bdc885bd69 Avoid UB when checking truncation range
Fixes #1818
2025-09-04 12:04:10 -04:00
Rangi42
5b67dc94b6 Add more test coverage 2025-09-04 01:29:50 -04:00
Rangi42
4f702a4be8 Try to optimize RPN expressions with .emplace_back instead of .push_back 2025-09-03 23:00:06 -04:00
Rangi42
c5d437ab3c Tell people to use character literals or CHARVAL instead of strings as numbers 2025-09-03 22:46:19 -04:00
Rangi42
c5c2800f17 Move RPN buffer encoding logic into rpn.cpp 2025-09-03 22:36:00 -04:00
Rangi42
c798500563 Don't call rpn.clear() when we can safely assume it's already empty() 2025-09-03 21:02:57 -04:00
Rangi
590d113e94 Use a vector of RPN values (#1820)
This is instead of byte-encoding them in a different way than the actual object output's RPN buffer
2025-09-03 14:42:37 -04:00
Rangi
ee1db0a582 Fix RPN patches for all commands (#1819) 2025-09-02 16:44:25 -04:00
Rangi42
5701d747d4 Document the stricter rules for lexing underscores in integer constants 2025-09-02 14:39:28 -04:00
Rangi42
2110aaca20 Fix RGBLINK and RGBGFX warning/error message colors 2025-09-01 20:51:33 -04:00
Rangi42
8df88f92ba Release v1.0.0-rc1 v1.0.0-rc1 2025-09-01 18:09:42 -04:00
Rangi
534a4efee4 Add 0/1/2 warning levels to rgblink -Wtruncation (#1816) 2025-09-01 15:35:53 -04:00
Rangi42
cc96b4d517 Two small improvements
- Check whether `.read()` completed
- `.reserve()` expected space ahead of time
2025-09-01 11:46:41 -04:00
Rangi42
0ccdbf509a Simplify format specs to not use a per-character state machine 2025-08-30 12:23:01 -04:00
Rangi
531278961f Require underscores to actually be digit separators (#1812)
Multiple, trailing, or next to decimal point are errors
2025-08-30 10:44:20 -04:00
Rangi
85176ef10a Fix q format spec (#1811) 2025-08-29 14:23:49 -04:00
Rangi
02b880e1b0 Separate RGBFIX header fixing from CLI option parsing (#1808) 2025-08-28 12:28:08 -04:00
Rangi42
c6997fe73c Factor out InsertionOrderedMap to group an indexed list with a string-keyed map 2025-08-26 16:04:45 -04:00
Rangi42
c578a7b761 More specific error message when an expression is not constant because a symbol is undefined 2025-08-24 22:02:41 -04:00
Rangi42
8564df51e5 -Wexport-undefined warning for exporting undefined symbols 2025-08-24 17:36:47 -04:00
Rangi42
62d3b44768 Add test for UNION without NEXTU 2025-08-24 13:08:27 -04:00
Rangi42
ead5337fe0 Use scoped blocks for case-specific variables 2025-08-23 21:52:22 -04:00
Rangi42
0d509aa65c Suggest DEF when undefined macros look like definitions 2025-08-23 21:40:51 -04:00
Rangi42
fcfc931867 Shorten lexing of simple tokens 2025-08-20 22:37:03 -04:00
Rangi
3d155d5695 Some refactoring and cleanup (#1806)
* Use clang-tidy `misc-include-cleaner` for IWYU `#include` cleanup

* Use `std::optional<size_t>` instead of `ssize_t`

* Rename some functions in linkdefs.hpp

* Fix header order
2025-08-20 16:09:04 -04:00
Rangi42
92ed6ece53 Support 32-bit addresses ("XL4") as of SDCC 4.4.0 2025-08-20 09:17:45 -04:00
Rangi42
e0e9ef190a Clarify DAA documentation 2025-08-20 08:57:32 -04:00
Rangi42
386fb5f398 Add more character utility functions 2025-08-19 19:17:40 -04:00
Rangi42
94e9ef5213 Factor shared code out of lexer_CaptureRept and lexer_CaptureMacro 2025-08-19 18:11:50 -04:00