make parse_success always skip past trivia in the tokenlist
This commit is contained in:
		| @@ -1,4 +1,5 @@ | ||||
| #include "parser_util.h" | ||||
| #include "tokenlist.h" | ||||
|  | ||||
| error_t *err_parse_no_match = | ||||
|     &(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) { | ||||
|     next = tokenlist_skip_trivia(next); | ||||
|     return (parse_result_t){.node = ast, .next = next}; | ||||
| } | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user