|
@@ -651,6 +651,8 @@ impl<'a> Parser<'a> {
|
|
let span_if = self.last().unwrap().span;
|
|
let span_if = self.last().unwrap().span;
|
|
let condition_expr = self.conversion()?;
|
|
let condition_expr = self.conversion()?;
|
|
|
|
|
|
|
|
+ self.match_exact(TokenKind::Newline);
|
|
|
|
+
|
|
if self.match_exact(TokenKind::Then).is_none() {
|
|
if self.match_exact(TokenKind::Then).is_none() {
|
|
return Err(ParseError::new(
|
|
return Err(ParseError::new(
|
|
ParseErrorKind::ExpectedThen,
|
|
ParseErrorKind::ExpectedThen,
|
|
@@ -660,6 +662,8 @@ impl<'a> Parser<'a> {
|
|
|
|
|
|
let then_expr = self.condition()?;
|
|
let then_expr = self.condition()?;
|
|
|
|
|
|
|
|
+ self.match_exact(TokenKind::Newline);
|
|
|
|
+
|
|
if self.match_exact(TokenKind::Else).is_none() {
|
|
if self.match_exact(TokenKind::Else).is_none() {
|
|
return Err(ParseError::new(
|
|
return Err(ParseError::new(
|
|
ParseErrorKind::ExpectedElse,
|
|
ParseErrorKind::ExpectedElse,
|