Closed joncatanio closed 6 years ago
Updated error checking places with get_token_expect()
.
Write validation() functions that take in AST nodes or Tokens and do the validation subsequently returning the passed in parameter.
mod.rs
should have all the panic!()
calls replaced. A ParserError
should be bubbled up to main where the error is handled and the program can be exit with an error code.
see 1f18e0c did a pretty big refactor that covered a bunch of ground in terms of error handling. Closing this task because at this point it'll be easy to add any errors that aren't currently caught.
In the parser's current state there are not very helpful error messages. The parser operates completely fine on functioning code but doesn't make many validation checks like those found in the CPython parser. These need to be updated as much as possible.