Commit Graph

24 Commits

Author SHA1 Message Date
Rangi42
2069a95e0f Use std::string for macro args 2024-03-02 05:23:15 -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
043db49676 Replace NULL with nullptr (#1321) 2024-02-29 15:06:33 -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
d1fa5ccd4d Rename lexer_DeleteState to lexer_CleanupState 2024-02-29 13:44:08 -05:00
Rangi42
d6681d3580 struct Section's src can be const 2024-02-29 13:44:08 -05:00
Rangi42
c3eb532439 Use copy constructor for file stack node 2024-02-29 13:44:08 -05:00
Rangi42
0bed84174b Use std::string for FOR loop variables 2024-02-29 13:44:08 -05:00
Rangi42
31836967fa Use automatic allocation for lexer states
Lexer states are now owned by fstack contexts
2024-02-29 13:44:08 -05:00
Rangi42
cf42d035f2 Use std::variant for file stack nodes 2024-02-29 13:44:08 -05:00
Rangi42
4b2294292a Use std::string for target file name 2024-02-29 13:44:08 -05:00
Rangi42
0e19f6c0ae Use automatic allocation for fstack nodes' iters/names 2024-02-29 13:44:08 -05:00
Rangi42
e98d1efee3 Use std::vector for include paths 2024-02-29 13:44:08 -05:00
Rangi42
e4764e37b1 Use std::stack for fstack contexts 2024-02-29 13:44:08 -05:00
Rangi42
1afc8554c0 Use std::deque for file stack nodes 2024-02-29 13:44:08 -05:00
Sylvie
b66212e6d6 Fix fstack traces for macro nodes (#1318)
Since the lexer rewrite, MACRO nodes' fstack traces have not
included their parent REPT nodes' names.
2024-02-24 20:23:25 -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
Sylvie
6d29d2a67e Simplify fstk_FindFile usage (#1310)
* Simplify `fstk_FindFile` usage

* Use `std::string` for `fstk_FindFile`
2024-02-22 13:14:38 +01: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
Sylvie
66fd5a7062 Fix some usually disabled compiler warnings (#1286)
* Fixes from temporarily re-enabling more compiler warnings

* More edits suggested by cppcheck

* Fix hanging on append_yylval_string

* Fix FOR loop increment
2024-01-18 20:47: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
9fc088dcb0 Fix the FOR loop count formula (#1222) 2023-11-07 23:43:46 +01:00
Rangi
1e70e703a7 Build everything as C++ (#1176) 2023-11-07 21:45:56 +01:00