lexer.c: add visual hint that tokens are printed

(When the -t flag is specified)
This commit is contained in:
XOR 2023-05-01 21:18:05 +02:00
parent 22f0c00462
commit dc905669a9

View file

@ -98,10 +98,11 @@ void lexer(FILE *input_file, char tokens[][MAX_TOKEN_SIZE])
void print_tokens(char tokens[][MAX_TOKEN_SIZE])
{
printf("=====================\nTokens generated from assembly file:\n");
int token_index = 0;
while (tokens[token_index][0] != EOF)
{
printf("%s\n", tokens[token_index]);
printf("%d: %s\n", token_index, tokens[token_index]);
token_index++;
}
}