Skip to content

Commit fb41bfc

Browse files
committed
Revert unnecessary conditional logic
1 parent 6726d42 commit fb41bfc

File tree

1 file changed

+2
-11
lines changed

1 file changed

+2
-11
lines changed

src/parser/mod.rs

+2-11
Original file line numberDiff line numberDiff line change
@@ -488,17 +488,8 @@ impl<'a> Parser<'a> {
488488
}
489489

490490
let statement = self.parse_statement()?;
491-
expecting_statement_delimiter = match &statement {
492-
Statement::If(s) => match &s.if_block.conditional_statements {
493-
// the `END` keyword doesn't need to be followed by a statement delimiter, so it shouldn't be expected here
494-
ConditionalStatements::BeginEnd { .. } => false,
495-
// parsing the statement sequence consumes the statement delimiter, so it shouldn't be expected here
496-
ConditionalStatements::Sequence { .. } => false,
497-
},
498-
// Treat batch delimiter as an end of statement, so no additional statement delimiter expected here
499-
Statement::Go(_) => false,
500-
_ => true,
501-
};
491+
// Treat batch delimiter as an end of statement, so no additional statement delimiter expected here
492+
expecting_statement_delimiter = !matches!(statement, Statement::Go(_));
502493
stmts.push(statement);
503494
}
504495
Ok(stmts)

0 commit comments

Comments
 (0)