make parse_success always skip past trivia in the tokenlist
This commit is contained in:
parent
a22cfb436e
commit
6794799b5f
@ -1,4 +1,5 @@
|
|||||||
#include "parser_util.h"
|
#include "parser_util.h"
|
||||||
|
#include "tokenlist.h"
|
||||||
|
|
||||||
error_t *err_parse_no_match =
|
error_t *err_parse_no_match =
|
||||||
&(error_t){.message = "parsing failed to find the correct token sequence"};
|
&(error_t){.message = "parsing failed to find the correct token sequence"};
|
||||||
@ -12,6 +13,7 @@ parse_result_t parse_no_match() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
parse_result_t parse_success(ast_node_t *ast, tokenlist_entry_t *next) {
|
parse_result_t parse_success(ast_node_t *ast, tokenlist_entry_t *next) {
|
||||||
|
next = tokenlist_skip_trivia(next);
|
||||||
return (parse_result_t){.node = ast, .next = next};
|
return (parse_result_t){.node = ast, .next = next};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user