Implement new features for updated python asdl

This commit is contained in:
Jeong YunWon 2022-08-12 05:24:19 +09:00
parent 308c82a935
commit 266b1f1aea
3 changed files with 52 additions and 40 deletions

View file

@ -37,6 +37,7 @@ pub enum CompileErrorType {
TooManyStarUnpack,
EmptyWithItems,
EmptyWithBody,
NotImplementedYet, // RustPython marker for unimplemented features
}
impl fmt::Display for CompileErrorType {
@ -78,6 +79,9 @@ impl fmt::Display for CompileErrorType {
CompileErrorType::EmptyWithBody => {
write!(f, "empty body on With")
}
CompileErrorType::NotImplementedYet => {
write!(f, "RustPython does not implement this feature yet")
}
}
}
}