Reorganize the asm parser to be more like the linker script parser

Split the declarations into those required for the `%union` and
those only required for the `code`.
Only declare functions on top; define them at the bottom.
This commit is contained in:
Rangi42
2024-02-29 16:17:55 -05:00
parent 043db49676
commit 91d22f180e
3 changed files with 481 additions and 455 deletions

View File

@@ -4,8 +4,6 @@
#define RGBDS_FORMAT_SPEC_H
#include <stdint.h>
#include <variant>
#include <vector>
enum FormatState {
FORMAT_SIGN, // expects '+' or ' ' (optional)
@@ -30,11 +28,6 @@ struct FormatSpec {
bool valid;
};
struct StrFmtArgList {
char *format;
std::vector<std::variant<uint32_t, char *>> *args;
};
FormatSpec fmt_NewSpec(void);
bool fmt_IsEmpty(FormatSpec const *fmt);
bool fmt_IsValid(FormatSpec const *fmt);