Improved logger whilst debugger is active

This commit is contained in:
Pasha Bibko
2025-05-08 14:45:44 +01:00
parent 094101ffdd
commit 141bb1530b
3 changed files with 15 additions and 6 deletions

View File

@@ -245,12 +245,15 @@ namespace LX
Log::out("\n"); // Puts a space to clean up the log
for (auto& token : tokens)
for (int i = 0; i < tokens.size(); i++)
{
Token& token = tokens[i];
Log::out<Log::Priority::HIGH>
(
std::left,
"{ Line: ", std::setw(3), token.line,
"T-Index: ", std::setw(5), i,
" { Line: ", std::setw(3), token.line,
", Index: ", std::setw(3), token.index,
", Length: ", std::setw(2), token.length, " } ",
std::setw(30), ToString(token.type) + ":", "{", token.GetContents(), "}"