Skip to content

Commit 3c4b218

Browse files
committed
Revert unnecessary conditional logic
1 parent a62d99d commit 3c4b218

File tree

1 file changed

+2
-11
lines changed

1 file changed

+2
-11
lines changed

src/parser/mod.rs

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -496,17 +496,8 @@ impl<'a> Parser<'a> {
496496
}
497497

498498
let statement = self.parse_statement()?;
499-
expecting_statement_delimiter = match &statement {
500-
Statement::If(s) => match &s.if_block.conditional_statements {
501-
// the `END` keyword doesn't need to be followed by a statement delimiter, so it shouldn't be expected here
502-
ConditionalStatements::BeginEnd { .. } => false,
503-
// parsing the statement sequence consumes the statement delimiter, so it shouldn't be expected here
504-
ConditionalStatements::Sequence { .. } => false,
505-
},
506-
// Treat batch delimiter as an end of statement, so no additional statement delimiter expected here
507-
Statement::Go(_) => false,
508-
_ => true,
509-
};
499+
// Treat batch delimiter as an end of statement, so no additional statement delimiter expected here
500+
expecting_statement_delimiter = !matches!(statement, Statement::Go(_));
510501
stmts.push(statement);
511502
}
512503
Ok(stmts)

0 commit comments

Comments
 (0)