You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 30, 2020. It is now read-only.
This issue corresponds to an item on the current To-Do list in README.md.
From my experiences, there's going to be quite a bit going into this:
A location type, that contains information including, but not limited to:
Current file
Beginning of the location
End of the location
An error type. The OCaml compiler uses exception, but this has the problem that only one error can be raised per parse. Keeping track of multiple errors and discarding malformed expressions (or even adding a node to the AST that notes an error) is more ideal.
Error recovery (some way of sanely handling errors, and continuing to lex/parse). In Kiln, I'm doing this via a Queue that contain errors in the Lexer/Parser modules , and ensuring that they are empty before proceeding to the next stage of compilation.
A way to pretty print errors. A suggested way to do this is with an open sum type in an Errors module. This leads to being able to handle both specific errors and more generic errors in same match statement
The OCaml compiler is a fantastic example for some of these things.
The work I'm doing in Kiln is also relevant.
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
This issue corresponds to an item on the current To-Do list in README.md.
From my experiences, there's going to be quite a bit going into this:
location
type, that contains information including, but not limited to:error
type. The OCaml compiler usesexception
, but this has the problem that only one error can be raised per parse. Keeping track of multiple errors and discarding malformed expressions (or even adding a node to the AST that notes an error) is more ideal.Queue
that contain errors in theLexer
/Parser
modules , and ensuring that they are empty before proceeding to the next stage of compilation.Errors
module. This leads to being able to handle both specific errors and more generic errors in samematch
statementThe OCaml compiler is a fantastic example for some of these things.
The work I'm doing in Kiln is also relevant.
The text was updated successfully, but these errors were encountered: