Allow piecewise without 'otherwise' branch

This commit is contained in:
bakk 2022-01-16 21:06:51 +01:00
parent 4e86a62f1f
commit 61713b0ead

View File

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