Mercurial > python-compiler.rs
comparison src/ast_dump.rs @ 52:d9838e8b3ec5
Add ast.Ellipsis.
author | Bastien Orivel <eijebong@bananium.fr> |
---|---|
date | Wed, 08 Jun 2016 19:01:46 +0200 |
parents | ded1907b7a69 |
children | 1a815946c2e5 |
comparison
equal
deleted
inserted
replaced
51:ded1907b7a69 | 52:d9838e8b3ec5 |
---|---|
153 expr::Attribute(value, attr, ctx) => format!("{}.{}", value.to_string(), attr), | 153 expr::Attribute(value, attr, ctx) => format!("{}.{}", value.to_string(), attr), |
154 expr::Name(name, ctx) => format!("{}", name), | 154 expr::Name(name, ctx) => format!("{}", name), |
155 expr::List(elts, ctx) => format!("[{}]", args_to_string(elts)), | 155 expr::List(elts, ctx) => format!("[{}]", args_to_string(elts)), |
156 expr::ListComp(elt, generators) => format!("[{} {}]", elt.to_string(), generators_to_string(generators)), | 156 expr::ListComp(elt, generators) => format!("[{} {}]", elt.to_string(), generators_to_string(generators)), |
157 expr::DictComp(key, value, generators) => format!("{{{}: {} {}}}", key.to_string(), value.to_string(), generators_to_string(generators)), | 157 expr::DictComp(key, value, generators) => format!("{{{}: {} {}}}", key.to_string(), value.to_string(), generators_to_string(generators)), |
158 expr::Tuple(elts, ctx) => format!("({})", args_to_string(elts)) | 158 expr::Tuple(elts, ctx) => format!("({})", args_to_string(elts)), |
159 expr::Ellipsis => format!("..."), | |
159 } | 160 } |
160 } | 161 } |
161 } | 162 } |
162 | 163 |
163 impl arguments { | 164 impl arguments { |