The last character read was not updated after the filters
This commit is contained in:
parent
b58ed03dca
commit
16fb99162f
|
@ -93,6 +93,7 @@ int parser_scan_filter(Parser * parser)
|
||||||
return EOF;
|
return EOF;
|
||||||
parser->lookahead += l;
|
parser->lookahead += l;
|
||||||
}
|
}
|
||||||
|
parser->last = c;
|
||||||
return c;
|
return c;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -196,7 +197,7 @@ int parser_get_token(Parser * parser, Token ** token)
|
||||||
return 1;
|
return 1;
|
||||||
c = (parser->last == EOF) ? parser_scan_filter(parser) : parser->last;
|
c = (parser->last == EOF) ? parser_scan_filter(parser) : parser->last;
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
fprintf(stderr, "DEBUG: parser_get_token() %c\n", c);
|
fprintf(stderr, "DEBUG: %s() %c\n", __func__, c);
|
||||||
#endif
|
#endif
|
||||||
for(i = 0; i < parser->callbacks_cnt; i++)
|
for(i = 0; i < parser->callbacks_cnt; i++)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue
Block a user