Prepare for string literal parsing

This commit is contained in:
Curle 2020-11-22 00:42:13 +00:00
parent 9ff658615b
commit b384973379
Signed by: TheCurle
GPG Key ID: 5942F13718443F79
2 changed files with 3 additions and 2 deletions

View File

@ -42,6 +42,7 @@ enum TokenTypes {
CMP_GTE, // =>
LI_INT, // Integer literal
LI_STR, // String literal
LI_SEMIC, // ;
LI_LBRAC, // {

View File

@ -41,11 +41,11 @@ int ParseOptionalPointer() {
int Type;
// TODO: THIS IS WRONG AND SHOULD NOT EXIST
// TY_CHAR is 22, RET_CHAR is 1.
// TY_CHAR is 25, RET_CHAR is 1.
// Offset is 20. Rest are in order
if(CurrentToken.type >= TY_CHAR && CurrentToken.type <= TY_VOID) {
Type = CurrentToken.type - 23;
Type = CurrentToken.type - 24;
printf("\t\tConverting a %s token to a %s type.\n", TokenNames[CurrentToken.type], TypeNames[Type]);
} else {
DieDecimal("Illegal type for pointerisation", CurrentToken.type);