Fix off by one error

pull/4/head
Lily Aurora N. 3 weeks ago
parent f8d95a6891
commit 25ce9bb520
Signed by untrusted user: MinekPo1
GPG Key ID: DD811C9D0D40B8CE

@ -166,7 +166,7 @@ impl Ast {
},
Ast::List(Localised { item, location }) => {
println!("{} List ({}:{})", prefix_, location.line_start(), location.col_start());
for i in 0..item.len()-2 {
for i in 0..item.len()-1 {
item[i].pretty_print(Some(&(body_prefix_.to_owned() + &String::from(" ├─ "))), Some(&(body_prefix_.to_owned() + &String::from(" │ "))));
}
item[item.len()-1].pretty_print(Some(&(body_prefix_.to_owned() + &String::from(" ╰─ "))), Some(&(body_prefix_.to_owned() + &String::from(" "))));

Loading…
Cancel
Save