Inline some helper functions for lexer

This commit is contained in:
Max Brunsfeld 2014-10-17 15:22:01 -07:00
parent ad9aee30e0
commit 5c600942df
3 changed files with 14 additions and 31 deletions

View file

@ -253,7 +253,7 @@ static int handle_error(TSParser *parser) {
* just skip it. If the end of input is reached, exit.
*/
if (ts_length_eq(parser->lexer.current_position, prev_position))
if (!ts_lexer_advance(&parser->lexer)) {
if (!parser->lexer.advance_fn(&parser->lexer)) {
DEBUG_PARSE("fail_to_recover");
resize_error(parser, error);