metamath / metamath-knife

Metamath-knife can rapidly verify Metamath proofs, providing strong confidence that the proofs are correct.
Apache License 2.0
26 stars 11 forks source link

Fix a grammar panic #75

Closed tirix closed 2 years ago

tirix commented 2 years ago

When a token string is too short to be parsed into a valid expression, grammar issues a ParsedStatementTooShort diagnostic with a hint of what could have been a next valid token.

However, this was done assuming there would always be such a next a next token, and panicked if not.

This PR fixes it by providing an alternate diagnostic message.