Rangi42
1adf68d018
Refer to "label scope", not "symbol scope"
2024-09-10 21:38:50 +02:00
Rangi42
56af572bfd
Refactor symbol value getters for less redundancy
2024-09-10 21:38:50 +02:00
Rangi42
155e7287db
Store a pointer to the scoped label, not just its name
2024-09-10 21:38:50 +02:00
Sylvie
7435630d6a
Error messages note when a symbol has been purged ( #1453 )
2024-08-06 15:35:06 -04:00
Sylvie
fc8707886c
Output exported numeric constants to sym file ( #1439 )
2024-08-06 10:58:35 -04:00
Sylvie
f304e1dd7f
Implement state file output for RGBASM ( #1435 )
2024-08-05 12:41:40 -04:00
Rangi42
b8387427a6
Use consistent RGBDS_<PROG>_<NAME>_HPP header guard convention
2024-04-14 21:50:05 -04:00
Rangi42
78801e324c
Group pointer and size as a ContentSpan struct
2024-03-27 11:27:34 -04:00
Rangi42
bf0cabb3ea
Use std::shared_ptr for lexer capture buffers
2024-03-27 11:27:34 -04:00
Rangi42
cb59119881
Use automatically-allocated std::string_view for macros
2024-03-25 11:33:17 -04:00
ISSOtm
9f239f6dcc
Use std::shared_ptr<std::string> for lexed/parsed strings
2024-03-22 14:25:36 -04:00
Sylvie
04405fb444
Use std::shared_ptr for fstack nodes ( #1371 )
2024-03-22 13:27:21 -04:00
Rangi42
472d1bde06
Pass std::string references to symbol functions
2024-03-18 14:42:05 -04:00
Sylvie
53537cf9af
Remove now-unnecessary enum keyword ( #1338 )
...
C++ does not need it
2024-03-08 19:40:41 -05:00
Rangi42
097b7c3baf
Use std::string for symbol names
2024-03-07 12:40:33 -05:00
Sylvie
e74073e480
Run clang-format on everything ( #1332 )
2024-03-04 14:22:49 -05:00
Sylvie
b004648a13
Use std::variant for symbol values ( #1331 )
2024-03-04 08:55:33 -05:00
Rangi42
13904dc536
Remove EQUS callbacks for symbols
...
They're no longer used since `__FILE__` was removed
2024-03-03 21:26:44 -05:00
Sylvie
f8dab23e8f
Use uncommented sizes for pointer-to-array arguments ( #1329 )
...
This is syntactically valid despite not being enforced, and
is a feature we already use elsewhere.
2024-03-03 19:43:08 -05:00
Rangi42
277ea9be28
Replace RGBASM non-null pointers with references
2024-03-03 00:57:03 -05:00
Rangi42
2e1b0b6421
Remove commented-out C-only macro features
2024-03-02 20:17:22 -05:00
Sylvie
a71e4086a2
Use std::string_view for macro bodies ( #1326 )
...
This removes the last use of `strdup`
This required making a lot of related pointers be `const`.
That in turn conflicted with the need to `munmap()` a pointer
eventually, which was similar to the need to eventually `free()`
an `Expansion`'s contents, so I used the same solution of a
`union`. That lets us normally use the `const` pointer for
`const` correctness, and the non-`const` one for the not-really-
mutating destruction cases.
2024-03-02 13:21:28 -05:00
Sylvie
1ac3c0262f
Refactor structs to use methods instead of functions ( #1322 )
2024-03-01 13:11:45 -05:00
Rangi42
e14ba664ea
Remove redundant (void) parameter declarations
2024-03-01 10:41:47 -05:00
Sylvie
eff8c324c8
Remove now-unnecessary struct keyword ( #1320 )
...
C++ acts like structs are `typedef`ed by default
We do have to keep `struct stat`, since there's ambiguity
with the function also called `stat`.
2024-02-29 14:41:58 -05:00
Rangi42
962398969b
Use std::string for PURGE args
2024-02-29 13:44:08 -05:00
Rangi42
83d3a39dcd
Use std::map for rgbasm symbols
2024-02-29 13:44:08 -05:00
Rangi42
521ca1c34a
Use std::vector for symbols
2024-02-29 13:44:08 -05:00
Sylvie
595c066c2a
Remove #include <stdbool.h> ( #1317 )
2024-02-24 10:51:46 -05:00
Sylvie
c0d534f5ad
No more flexible array members (not standard C++) ( #1307 )
...
* Replace FAMs with `std::vector`s (or one `std::string`) in four `struct`s
* Anonymous types declared in an anonymous union are also non-standard
Only Clang complains about this (-Wnested-anon-types)
2024-02-22 16:22:37 -05:00
Rangi42
bc8fd8a6dc
Separate union members for EQUS and MACROs
2024-02-19 08:49:04 -05:00
Sylvie
9cdd0b8a02
No more anonymous structs (not standard C++) ( #1305 )
...
This is one step to restoring `-pedantic` builds
2024-02-19 08:12:20 +01:00
Rangi
cee3d1c859
Add more test coverage for RGBASM ( #1256 )
...
This also fixes two bugs: `-1 >>> 32` was -1 not 0, and `macro_FreeArgs` should have been called but wasn't.
2023-11-29 15:16:05 -05:00
Rangi
1e70e703a7
Build everything as C++ ( #1176 )
2023-11-07 21:45:56 +01:00