Generator literal support

This commit is contained in:
John Kåre Alsaker
2016-12-26 14:34:03 +01:00
parent 6f815ca771
commit d861982ca6
127 changed files with 3238 additions and 259 deletions

View File

@@ -2280,6 +2280,21 @@ impl<'a> State<'a> {
self.print_expr(e)?;
self.pclose()?;
},
ast::ExprKind::Yield(ref e) => {
word(&mut self.s, "yield")?;
match *e {
Some(ref expr) => {
word(&mut self.s, " ")?;
self.print_expr(&expr)?;
}
_ => ()
}
}
ast::ExprKind::ImplArg => {
word(&mut self.s, "impl")?;
space(&mut self.s)?;
word(&mut self.s, "arg")?;
}
ast::ExprKind::Try(ref e) => {
self.print_expr(e)?;
self.s.word("?")?