invert if statement
This commit is contained in:
parent
9b4815e75f
commit
ef25481420
@ -597,14 +597,14 @@ impl<'a> Parser<'a> {
|
|||||||
}
|
}
|
||||||
'{' => {
|
'{' => {
|
||||||
self.toks.next();
|
self.toks.next();
|
||||||
if !found_true {
|
if found_true {
|
||||||
|
self.throw_away_until_closing_curly_brace();
|
||||||
|
} else {
|
||||||
found_true = true;
|
found_true = true;
|
||||||
body = read_until_closing_curly_brace(self.toks)?;
|
body = read_until_closing_curly_brace(self.toks)?;
|
||||||
self.toks.next();
|
self.toks.next();
|
||||||
break;
|
|
||||||
} else {
|
|
||||||
self.throw_away_until_closing_curly_brace();
|
|
||||||
}
|
}
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
_ => {
|
_ => {
|
||||||
return Err(("expected \"{\".", tok.pos()).into());
|
return Err(("expected \"{\".", tok.pos()).into());
|
||||||
|
Loading…
x
Reference in New Issue
Block a user