grammar doesn't work for single instruction zero operands #16
Loading…
x
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
the grammar can't tell the difference between instructions with a single argument or an instruction with zero arguments followed by an instruction
This is problematic, I'm not sure what the best fix is. Probably the solution is to remove newlines from trivia tokens and require that each instruction end with a newline.
While this would be an easy solution, there's a question on what to do with empty lines then. They would either need to be collected in a NODE_NEWLINE or (preferably) we would be able to skip them somehow.
Currently the entire parser operates under the assumption that a parse node is always returned if there is no error in the result. Skipping nodes could work by returning a result that has no error and no parse node. All of the combinators would need to be able to work with that though.
Then there is the question about what to do with newlines in future .data directives:
initially the plan was to allow big tables to be defined like this across newlines. I suppose it is best to also force these to be on a single line.
fixed by #17