Update the compiler to use the new asdl ast types

This commit is contained in:
Noah 2021-01-10 00:46:59 -06:00
parent 7c2c787404
commit dc8b93a417
4 changed files with 745 additions and 746 deletions

View file

@ -17,8 +17,6 @@ pub enum CompileErrorType {
Assign(&'static str),
/// Invalid delete
Delete(&'static str),
/// Expected an expression got a statement
ExpectExpr,
SyntaxError(String),
/// Multiple `*` detected
MultipleStarArgs,
@ -45,7 +43,6 @@ impl fmt::Display for CompileErrorType {
match self {
CompileErrorType::Assign(target) => write!(f, "can't assign to {}", target),
CompileErrorType::Delete(target) => write!(f, "can't delete {}", target),
CompileErrorType::ExpectExpr => write!(f, "Expecting expression, got statement"),
CompileErrorType::SyntaxError(err) => write!(f, "{}", err.as_str()),
CompileErrorType::MultipleStarArgs => {
write!(f, "two starred expressions in assignment")