Commit Graph

9 Commits

Author SHA1 Message Date
Rangi
56071599e7 Allow trailing commas in bare lists
This applies to macro arguments, DB, DW, DL, DS,
PRINT, PRINTLN, EXPORT, PURGE, and OPT.

It also removes support for empty entries in DB/DW/DL.
(Deprecating it would require keeping parser support,
which is ambiguous with trailing commas.)

Fixes #753
2021-03-02 11:48:20 +01:00
Rangi
1dafc1c762 Allow empty macro arguments, with a warning
Fixes #739
2021-02-28 10:38:49 -08:00
Rangi
0e40543757 Implement \# to expand to all unshifted macro arguments
Fixes #596
2020-12-14 00:12:36 +01: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
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
aaaaaa123456789
a828f82414 Remove fixed-size array for macro arguments 2020-05-12 06:46:07 -03:00
ISSOtm
2f466c2939 Revamp macro arg system
This should significantly improve performance: on pokecrystal builds, perf
reported as much CPU time spent on `yyparse` as on `sym_UseNewMacroArgs`
Measurements show ~6 seconds of improvement on that codebase.

This also fixes #321, as a bonus, due to saner management!
2020-03-14 16:13:40 +01:00
ISSOtm
a259f53b52 Rename macro functions with proper prefix 2020-03-13 23:20:27 +01:00
ISSOtm
ffdb1fbfe5 Split macro arg management into its own file
It has no relation to symbols, and helps a tiny bit deflate `symbol.c`
2020-03-11 02:39:36 +01:00