Fixed a bug where the tokenizer wasn't parsing hexadecimal numbers correctly. Added support for tokenizing the colon and comma characters.
This commit is contained in:
+15
-1
@@ -30,10 +30,24 @@ int main(int argc, char** argv) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
char* buffer;
|
||||
|
||||
for(int i = 0; i < tokens->Size; i++) {
|
||||
Token* token = tokens->Items[i];
|
||||
|
||||
printf("%s ", TokenStringify(token, false));
|
||||
if (token->Type == LineEnd) {
|
||||
printf("\n");
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
buffer = TokenStringify(token);
|
||||
|
||||
if (buffer) {
|
||||
printf("%s ", buffer);
|
||||
|
||||
free(buffer);
|
||||
}
|
||||
}
|
||||
|
||||
printf("\n");
|
||||
|
||||
Reference in New Issue
Block a user