MCPcopy Index your code
hub / github.com/endbasic/endbasic / reset_select

Method reset_select

core/src/parser.rs:1787–1806  ·  view source on GitHub ↗

Advances until the next statement after failing to parse a `SELECT` statement.

(&mut self, select_pos: LineCol)

Source from the content-addressed store, hash-verified

1785
1786 /// Advances until the next statement after failing to parse a `SELECT` statement.
1787 fn reset_select(&mut self, select_pos: LineCol) -> Result<()> {
1788 loop {
1789 match self.lexer.peek()?.token {
1790 Token::Eof => break,
1791 Token::End => {
1792 self.lexer.consume_peeked();
1793 self.expect_and_consume_with_pos(
1794 Token::Select,
1795 select_pos,
1796 "SELECT without END SELECT",
1797 )?;
1798 break;
1799 }
1800 _ => {
1801 self.lexer.consume_peeked();
1802 }
1803 }
1804 }
1805 self.reset()
1806 }
1807
1808 /// Parses a `WHILE` statement.
1809 fn parse_while(&mut self, while_pos: LineCol) -> Result<Statement> {

Callers 1

parse_oneMethod · 0.80

Calls 4

consume_peekedMethod · 0.80
peekMethod · 0.45
resetMethod · 0.45

Tested by

no test coverage detected