lexer.c: add visual hint that tokens are printed
(When the -t flag is specified)
This commit is contained in:
parent
22f0c00462
commit
dc905669a9
1 changed files with 2 additions and 1 deletions
|
@ -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++;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue