comparison src/ast_dump.rs @ 57:e5a808ec31c0

Add ast.Assert.
author Bastien Orivel <eijebong@bananium.fr>
date Sun, 12 Jun 2016 18:21:15 +0200
parents c3cc16b933d2
children a0b23123901b
comparison
equal deleted inserted replaced
56:c3cc16b933d2 57:e5a808ec31c0
263 }), 263 }),
264 stmt::Expr(expr) => format!("{}{}", current_indent, expr.to_string()), 264 stmt::Expr(expr) => format!("{}{}", current_indent, expr.to_string()),
265 stmt::Break => format!("{}break", current_indent), 265 stmt::Break => format!("{}break", current_indent),
266 stmt::Delete(targets) => format!("{}del {}", current_indent, vec_to_strings_vec(targets).join(", ")), 266 stmt::Delete(targets) => format!("{}del {}", current_indent, vec_to_strings_vec(targets).join(", ")),
267 stmt::Pass => format!("{}pass", current_indent), 267 stmt::Pass => format!("{}pass", current_indent),
268 stmt::Continue => format!("{}continue", current_indent) 268 stmt::Continue => format!("{}continue", current_indent),
269 stmt::Assert(test, msg) => {
270 format!("{}assert {}{}",
271 current_indent,
272 test.to_string(),
273 {
274 match msg {
275 Some(msg) => format!(", {}", msg.to_string()),
276 None => format!("")
277 }
278 }
279 )
280 }
269 } 281 }
270 } 282 }
271 } 283 }
272 284
273 #[allow(dead_code)] 285 #[allow(dead_code)]