parser
This commit is contained in:
@@ -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];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user