mirror of
https://github.com/PaddiM8/kalker.git
synced 2024-12-13 18:10:42 +01:00
Allow piecewise without 'otherwise' branch
This commit is contained in:
parent
4e86a62f1f
commit
61713b0ead
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user