fix: GetTokenName

This commit is contained in:
msojocs 2023-06-16 22:02:58 +08:00
parent a2eb9101f8
commit b7deccb9bb
2 changed files with 12 additions and 7 deletions

View File

@ -424,12 +424,19 @@ namespace WXML
class Token
{
/**
*
* 00 00 00 00 type
* 00 00 00 00... 0tokenName
*/
private:
/* data */
int type;
std::string tokenName;
public:
Token(/* args */);
~Token();
static const char * GetTokenName(const char **a1);
const char * GetTokenName();
};

View File

@ -12,15 +12,13 @@ namespace WXML
Token::~Token()
{
}
const char * Token::GetTokenName(const char **a1)
const char * Token::GetTokenName()
{
const char *result; // eax
result = *a1;
switch ( (unsigned int)*a1 )
const char *result;
switch ( this->type )
{
case 0u:
result = (const char *)(a1 + 1);
result = this->tokenName.c_str();
break;
case 1u:
result = "$DECIMAL";