Fixed Lexer tests

This commit is contained in:
Pasha Bibko
2025-08-20 21:25:33 +01:00
parent d604de28fd
commit b6db61b2c3
5 changed files with 26 additions and 8 deletions

View File

@@ -131,6 +131,9 @@ namespace PashaBibko::LXC::Lexer
char* contents;
};
// Function for converting token types to their equivalent C-Strings //
const char* TokenTypeToCStr(Token::TokenType type);
// Typedef for the output type of how the Lexer outputs //
typedef std::vector<Token> LexerOutput;
}

View File

@@ -55,7 +55,7 @@ namespace PashaBibko::LXC::Lexer
// Helper macro for converting type to string //
#define TOKEN_TYPE_CASE(type) case type: return #type;
static constexpr const char* TokenTypeToCStr(Token::TokenType type)
const char* TokenTypeToCStr(Token::TokenType type)
{
switch (type)
{