Allow piecewise without 'otherwise' branch

This commit is contained in:
bakk 2022-01-16 21:06:51 +01:00 committed by PaddiM8
parent 4704095cd9
commit 121e121724

View File

@ -264,6 +264,7 @@ fn parse_piecewise(context: &mut Context) -> Result<Expr, CalcError> {
(previous(context).kind == TokenKind::Semicolon (previous(context).kind == TokenKind::Semicolon
|| previous(context).kind == TokenKind::Newline) || previous(context).kind == TokenKind::Newline)
&& !reached_otherwise && !reached_otherwise
&& !match_token(context, TokenKind::ClosedBrace)
} {} } {}
advance(context); advance(context);