Fix display of list
This commit is contained in:
parent
850b77541b
commit
f90bfb88ca
@ -94,11 +94,15 @@ impl fmt::Display for Expression {
|
|||||||
write!(f, "«function: {}, {} arg(s)»", name, parameters.len())
|
write!(f, "«function: {}, {} arg(s)»", name, parameters.len())
|
||||||
}
|
}
|
||||||
ListLiteral(ref items) => {
|
ListLiteral(ref items) => {
|
||||||
write!(f, "[");
|
write!(f, "[ ");
|
||||||
for item in items {
|
let mut iter = items.iter().peekable();
|
||||||
write!(f, ", {}", item);
|
while let Some(item) = iter.next() {
|
||||||
|
write!(f, "{}", item);
|
||||||
|
if let Some(_) = iter.peek() {
|
||||||
|
write!(f, ", ");
|
||||||
}
|
}
|
||||||
write!(f, "]")
|
}
|
||||||
|
write!(f, " ]")
|
||||||
}
|
}
|
||||||
_ => write!(f, "UNIMPLEMENTED"),
|
_ => write!(f, "UNIMPLEMENTED"),
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user