Skip to content

Commit 6bf9ccd

Browse files
committed
Revert unnecessary conditional logic
1 parent c1efb4f commit 6bf9ccd

1 file changed

Lines changed: 2 additions & 11 deletions

File tree

src/parser/mod.rs

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

527527
let statement = self.parse_statement()?;
528-
expecting_statement_delimiter = match &statement {
529-
Statement::If(s) => match &s.if_block.conditional_statements {
530-
// the `END` keyword doesn't need to be followed by a statement delimiter, so it shouldn't be expected here
531-
ConditionalStatements::BeginEnd { .. } => false,
532-
// parsing the statement sequence consumes the statement delimiter, so it shouldn't be expected here
533-
ConditionalStatements::Sequence { .. } => false,
534-
},
535-
// Treat batch delimiter as an end of statement, so no additional statement delimiter expected here
536-
Statement::Go(_) => false,
537-
_ => true,
538-
};
528+
// Treat batch delimiter as an end of statement, so no additional statement delimiter expected here
529+
expecting_statement_delimiter = !matches!(statement, Statement::Go(_));
539530
stmts.push(statement);
540531
}
541532
Ok(stmts)

0 commit comments

Comments
 (0)