Rangi
f31deb5010
Fix STRUPR and STRLWR after 5aabb915ec
...
Fixes #647
2020-12-15 20:18:45 +01:00
ISSOtm
8f2a894b88
Add anonymous labels
...
Fix #497
2020-12-14 10:14:40 +01:00
Rangi
0e40543757
Implement \# to expand to all unshifted macro arguments
...
Fixes #596
2020-12-14 00:12:36 +01:00
Rangi
ce58f6d6be
Allow {symbol} interpolation outside of strings
...
Fixes #629
Closes #631
2020-12-13 23:53:16 +01:00
ISSOtm
5aabb915ec
Allow STRCAT to take any number of args
...
Fixes bullet point 1 of #625
2020-12-12 23:46:32 +01:00
Rangi
165bd8cb71
Allow 'dw' and 'dl' to apply to characters of strings
...
Fixes #568
The old behavior of `dw "string"` can be replicated with `dw ("string")`; likewise for dl
2020-12-11 11:02:20 +01:00
Rangi
af530859f0
Allow underscores in numeric literals
...
Fixes #539
Changes \@'s output to start with "_u", not "_", so it will be valid within labels but not numerics
2020-12-10 15:34:21 +01:00
Rangi
58739b0bf2
Implement STRRIN, like STRIN but searching from the right
2020-12-10 15:32:17 +01:00
ISSOtm
bdfce25db0
Avoid running version test when git describe fails
...
Can happen when not enough history has been fetched, notably in our CI
2020-12-10 13:43:22 +01:00
ISSOtm
bf789dd7b3
Add automated test for version consistency
...
Automatically check that the version number constants
(__RGBDS_MAJOR__ etc.) match `rgbasm -V`
Should avoid the problem with 0.4.2's release...
2020-12-10 12:22:29 +01:00
ISSOtm
ede982b50a
Bump patch level appropriately
...
*HEADDESK*
2020-12-09 20:30:31 +01:00
ISSOtm
462fd7539c
Prohibit nested macros
...
After discussion (starting there:
https://github.com/gbdev/rgbds/pull/594#issuecomment-706437458
), it was decided that plain nested macros should not be
allowed.
Since #590 is fixed, EQUS can be used as a workaround;
multiline strings (#589 ) will make that easier on the
user when implemented.
Fixes #588 , supersedes and closes #594 .
Additionally, closes #388 .
2020-12-09 10:44:39 +01:00
ISSOtm
f16e34b804
Fix captures beginning in expansions
...
Fixes #590
2020-12-09 09:54:55 +01:00
ISSOtm
cc4d455b8a
Add test for empty local label component
2020-11-21 00:58:40 +01:00
anderoonies
55be77be69
discard block comments delimited with /* */
2020-10-15 12:42:53 -04:00
Eldred Habert
42b3a17356
Merge pull request #602 from NieDzejkob/shiftstorm
...
Report only one error when invalid shift has argument
2020-10-13 15:48:16 +02:00
Jakub Kądziołka
4e1d79081c
Improve error message for negative shift arguments
2020-10-13 15:42:16 +02:00
Eldred Habert
05256946ac
Merge pull request #604 from NieDzejkob/narg-overwrite
...
Don't overwrite symbol when it's not allowed
2020-10-13 10:47:57 +02:00
Eldred Habert
73396166aa
Merge pull request #605 from NieDzejkob/invalid-labels
...
Don't consider difference of invalid labels constant
2020-10-13 10:42:05 +02:00
Jakub Kądziołka
4c5d5c7085
Don't consider difference of invalid labels constant
...
If a label is defined outside of a section, avoid trying to obtain its
value.
2020-10-12 23:03:14 +02:00
Jakub Kądziołka
045a9e8b93
Report only one error when invalid shift has argument
...
Not to mention that incrementing a variable in a loop is kinda dumb.
2020-10-12 22:54:20 +02:00
Jakub Kądziołka
b07aa00d5c
Don't overwrite symbol when it's not allowed
...
When a user tried to overwrite a builtin symbol, it would change its
type despite the error, making the second try succeed. This is
problematic, as the location of a builtin symbol cannot be updated.
2020-10-12 12:35:49 +02:00
Jakub Kądziołka
dc62d60e9b
reserveSpace: don't assume one doubling is enough
2020-10-12 11:57:03 +02:00
Eldred Habert
0836f67d42
Merge pull request #601 from NieDzejkob/utf8decoder
...
utf8decoder: Use byte-sized byte argument
2020-10-12 01:49:57 +02:00
Eldred Habert
176a57a1e9
Merge pull request #600 from NieDzejkob/stray-shift
...
Report error when shifting outside a macro
2020-10-12 01:44:10 +02:00
Jakub Kądziołka
6767d11c23
utf8decoder: Use byte-sized byte argument
...
This prevents passing a negative value out of a signed char by accident.
Also renders some casts in the code superfluous.
2020-10-12 01:22:09 +02:00
Jakub Kądziołka
217c10ddac
Report error when shifting outside a macro
2020-10-12 00:47:01 +02:00
Jakub Kądziołka
822e4e7c44
Report error when aligning outside of a section
2020-10-12 00:27:54 +02:00
Rangi
7c8ec5a5ed
Add a test case for charmaps that segfaults prior to this fix
2020-10-09 20:06:02 -04:00
Jakub Kądziołka
b421c983d6
link: Suppress cascading errors.
2020-10-04 18:14:22 +02: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
b65ea64a58
Add newlines to all test output
...
MacOS treats them differently, for some reason.
2020-10-04 04:46:01 +02:00
ISSOtm
ece6853e0f
Implement opt b and opt g
2020-10-04 04:46:00 +02:00
ISSOtm
b7b03ee451
Fix "REPT 0" not being a no-op
2020-10-04 04:45:59 +02:00
ISSOtm
f9b48c0cad
Fix else working incorrectly from macros
...
Since the "skip ELSE blocks" variable is global, it used to get carried
over from the macro's `if` to the outer's.
2020-10-04 04:45:59 +02:00
ISSOtm
b83b9825f8
Fix _NARG crashing outside of macros
...
And add a test for it
2020-10-04 04:45:59 +02:00
ISSOtm
baeb180acd
Apply error reporting changes to tests
2020-10-04 04:45:58 +02:00
ISSOtm
fd02ffb7bd
Implement __FILE__ symbol
...
Also clean up built-in symbol creation
This is not great, but currently okay.
Should be fixed later, like the rest...
2020-10-04 04:45:58 +02:00
ISSOtm
62ecdce0b0
Fix line-continuation-macro test
2020-10-04 04:45:58 +02:00
ISSOtm
3f5f9bcaf0
Fix numeric constant overflow checks
2020-10-04 04:45:58 +02:00
ISSOtm
cd747d8175
Fix many lexer bugs
...
More to come...
2020-10-04 04:39:25 +02:00
ISSOtm
e11f25024e
Add test for built-in file symbol
...
It's currently defined in fstack.c, making it more prone to accidental
dropping. Let's not repeat the 0.3.9 scenario...
2020-10-04 04:38:53 +02:00
ISSOtm
fed252bc49
Fix nested expansions being incorrectly handled
...
The biggest problem was simply that the length of children expansions was
not accounted for when skipping over the parent... this took a lot of
arduous debugging, but it finally works!
2020-10-04 04:38:52 +02:00
ISSOtm
61b2fd9816
Add string expansion reporting
...
And fix line counting with expansion-made newlines.
This has the same bug as the old lexer (equs-newline's output does not
print the second warning as being part of the expansion).
Additionally, we regress equs-recursion, as we are no longer able to
catch this specific EQUS recursion. Simply enough, the new expansion
begins **after** the old one ends! I have found no way to handle that.
2020-10-04 04:38:52 +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
2e3db9d56a
Clean up label generation
...
Only check for localness when we already know we have a local
2020-10-03 21:33:30 +02:00
Antonio Niño Díaz
dfcba36448
test: Update commit of uCity used for testing
...
This one updates the code to fix all warnings introduced in the last few
months because of updates to RGBDS.
2020-09-27 22:47:56 +01: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
ISSOtm
c0808246e5
Silence the mingw test
...
Use "quiet" instead of "count"...
2020-09-27 10:51:52 +02:00
ISSOtm
548e3dc31c
Correct previously-introduced test being a no-op
...
Forgot to invoke the macro due to a copy-paste error
2020-09-24 16:35:45 +02:00