Re-implement block copy to avoid expanding macro args

They were expanded during the capture, and there was no easy way to
avoid expanding them (believe me, after three hours and somehow an OOM, I
gave up trying).
This commit is contained in:
ISSOtm
2020-08-01 17:50:59 +02:00
parent 6e805cd318
commit 81a77a9b88
3 changed files with 163 additions and 38 deletions

View File

@@ -51,7 +51,7 @@ uint32_t lexer_GetLineNo(void);
uint32_t lexer_GetColNo(void);
void lexer_DumpStringExpansions(void);
int yylex(void);
void lexer_CaptureBlock(int blockStartToken, int blockEndToken, char **capture, size_t *size,
char const *name);
void lexer_CaptureRept(char **capture, size_t *size);
void lexer_CaptureMacroBody(char **capture, size_t *size);
#endif /* RGBDS_ASM_LEXER_H */