This commit is contained in:
2025-01-18 13:56:46 +05:00
parent bd8215fd73
commit dbe8569a3b
11 changed files with 143 additions and 75 deletions

View File

@@ -5,15 +5,19 @@ static cstr _TokenType_str[] = {
"SingleLineComment",
"MultiLineComment",
"Label",
"Instruction",
"Argument",
"DataDefinition",
"Number",
"Char",
"String",
"Instruction",
"Register",
"DataType",
"DataPointer",
"DataSize"
};
cstr TokenType_toString(TokenType t){
if(t >= sizeof(_TokenType_str) / sizeof(cstr))
if(t >= ARRAY_SIZE(_TokenType_str))
return "!!INDEX_ERROR!!";
return _TokenType_str[t];
}