Work with spanned labels in break and continue
This commit is contained in:
parent
c838b00d54
commit
490821ef30
@ -119,14 +119,14 @@ impl Rewrite for ast::Expr {
|
||||
// `continue`
|
||||
ast::Expr_::ExprAgain(ref opt_ident) => {
|
||||
let id_str = match *opt_ident {
|
||||
Some(ident) => format!(" {}", ident),
|
||||
Some(ident) => format!(" {}", ident.node),
|
||||
None => String::new(),
|
||||
};
|
||||
Some(format!("continue{}", id_str))
|
||||
}
|
||||
ast::Expr_::ExprBreak(ref opt_ident) => {
|
||||
let id_str = match *opt_ident {
|
||||
Some(ident) => format!(" {}", ident),
|
||||
Some(ident) => format!(" {}", ident.node),
|
||||
None => String::new(),
|
||||
};
|
||||
Some(format!("break{}", id_str))
|
||||
|
Loading…
x
Reference in New Issue
Block a user