Skip to content

Commit 0e5598e

Browse files
committed
Revert unnecessary conditional logic
1 parent ac55a62 commit 0e5598e

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
@@ -503,17 +503,8 @@ impl<'a> Parser<'a> {
503503
}
504504

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

0 commit comments

Comments
 (0)