Skip to content

Commit 33cf075

Browse files
committed
Revert unnecessary conditional logic
1 parent 803c278 commit 33cf075

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
@@ -508,17 +508,8 @@ impl<'a> Parser<'a> {
508508
}
509509

510510
let statement = self.parse_statement()?;
511-
expecting_statement_delimiter = match &statement {
512-
Statement::If(s) => match &s.if_block.conditional_statements {
513-
// the `END` keyword doesn't need to be followed by a statement delimiter, so it shouldn't be expected here
514-
ConditionalStatements::BeginEnd { .. } => false,
515-
// parsing the statement sequence consumes the statement delimiter, so it shouldn't be expected here
516-
ConditionalStatements::Sequence { .. } => false,
517-
},
518-
// Treat batch delimiter as an end of statement, so no additional statement delimiter expected here
519-
Statement::Go(_) => false,
520-
_ => true,
521-
};
511+
// Treat batch delimiter as an end of statement, so no additional statement delimiter expected here
512+
expecting_statement_delimiter = !matches!(statement, Statement::Go(_));
522513
stmts.push(statement);
523514
}
524515
Ok(stmts)

0 commit comments

Comments
 (0)