invert if statement

This commit is contained in:
Connor Skees 2020-07-07 17:25:24 -04:00
parent 9b4815e75f
commit ef25481420

View File

@ -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());