diff options
| author | Nick Cameron <ncameron@mozilla.com> | 2014-12-13 18:41:02 +1300 |
|---|---|---|
| committer | Nick Cameron <ncameron@mozilla.com> | 2014-12-24 09:12:45 +1300 |
| commit | 8a357e1d87971574817a033e5467785402d5fcfb (patch) | |
| tree | 7572e05c56f1a6f49964a24610c1c6c949b57c17 /src/libsyntax/print/pprust.rs | |
| parent | 53c5fcb99fc8c62b8723032280fab3dc06fef973 (diff) | |
| download | rust-8a357e1d87971574817a033e5467785402d5fcfb.tar.gz rust-8a357e1d87971574817a033e5467785402d5fcfb.zip | |
Add syntax for ranges
Diffstat (limited to 'src/libsyntax/print/pprust.rs')
| -rw-r--r-- | src/libsyntax/print/pprust.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/libsyntax/print/pprust.rs b/src/libsyntax/print/pprust.rs index 21410395a90..3d53bd8aadf 100644 --- a/src/libsyntax/print/pprust.rs +++ b/src/libsyntax/print/pprust.rs @@ -1759,6 +1759,13 @@ impl<'a> State<'a> { } try!(word(&mut self.s, "]")); } + ast::ExprRange(ref start, ref end) => { + try!(self.print_expr(&**start)); + try!(word(&mut self.s, "..")); + if let &Some(ref e) = end { + try!(self.print_expr(&**e)); + } + } ast::ExprPath(ref path) => try!(self.print_path(path, true)), ast::ExprBreak(opt_ident) => { try!(word(&mut self.s, "break")); |
