⚠️ Breaking Change
This release contains a breaking change, where the signatures of all Gratt.Parser.Parse
overloads were changed to include two addition parameters: eoi
and eoiErrorSelector
. Version 1.x had the flaw that the parser did not validate the entire input for syntax errors. The eoi
parameter designates a token kind as the end-of-input marker. When parser loops completes and fully unwinds from any recursion, the Parse
implementation will now check that the final token is indeed the one specified for eoi
. If not, it uses eoiErrorSelector
to project an Exception
that is then thrown to indicate a syntax error.