Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Statements parse error #79

Merged
merged 22 commits into from
Mar 23, 2022
Merged

Statements parse error #79

merged 22 commits into from
Mar 23, 2022

Conversation

tirix
Copy link
Collaborator

@tirix tirix commented Mar 23, 2022

This splits off a special error type for statement parsing, and adds a new API for parsing a given string.

There are use cases where we want to parse a string outside of the database. In that case, the string exists by itself and it does not make sense to reference to a containing database statement when building the error messages.

This PR moves diagnostics specific to this use case to a different class of errors.

(Ideally we could still include spans when reporting errors, but these would be relative to the beginning of the string rather than a database segment - that part could be in a follow-up PR)

This PR also introduces a utility undefined_cmd to generate the Diagnostic::UndefinedToken error.

@tirix tirix requested a review from digama0 March 23, 2022 05:06
@digama0 digama0 merged commit d39372e into metamath:main Mar 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants