Fix reparsing bug on "{}{}"

This commit is contained in:
pcpthm 2019-03-22 04:33:05 +09:00
parent 7669113e7c
commit edbc18516d
2 changed files with 5 additions and 1 deletions

View File

@ -111,7 +111,7 @@ fn is_balanced(tokens: &[Token]) -> bool {
return false;
}
let mut balance = 0usize;
for t in tokens.iter() {
for t in &tokens[1..tokens.len() - 1] {
match t.kind {
L_CURLY => balance += 1,
R_CURLY => {

View File

@ -0,0 +1,4 @@
0
0
}
{;