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
4704095cd9
commit
121e121724
@ -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);
|
||||||
|
Loading…
Reference in New Issue
Block a user