Color verbose output as magenta

Output RGBASM's lexed tokens at level 5 (TRACE)
This commit is contained in:
Rangi42
2025-08-05 00:00:57 -04:00
parent ac75a085fa
commit 2cae47a5a2
9 changed files with 35 additions and 2 deletions

View File

@@ -2255,8 +2255,9 @@ yy::parser::symbol_type yylex() {
lexerState->lastToken = token.type;
lexerState->atLineStart = token.type == T_(NEWLINE) || token.type == T_(EOB);
// Uncomment this if you want to debug what the lexer is lexing:
// fprintf(stderr, "{lexing %s}\n", yy::parser::symbol_type(token.type).name());
// LCOV_EXCL_START
verbosePrint(VERB_TRACE, "Lexed '%s' token\n", yy::parser::symbol_type(token.type).name());
// LCOV_EXCL_STOP
if (std::holds_alternative<uint32_t>(token.value)) {
return yy::parser::symbol_type(token.type, std::get<uint32_t>(token.value));