Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Handling for the initial token being TOK_UNKNOWN.
My intended idea was to have all syntax errors go through the same actions driven by parser.sid. But in this case SID's generated parser bails out immediately on TOK_UNKNOWN, and we never reach an ## alt. So we never reach <make-ast>, and thus never <err-syntax> about it. That's what the assertion was about; the generated parser should never return with a NULL AST. My workaround for this is just to recreate the equivalent syntax error at the top-level, which isn't very satisfying at all. But it does what we need here.
- Loading branch information