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

Method reset_for

core/src/parser.rs:1321–1335  ·  view source on GitHub ↗

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

(&mut self)

Source from the content-addressed store, hash-verified

1319
1320 /// Advances until the next statement after failing to parse a `FOR` statement.
1321 fn reset_for(&mut self) -> Result<()> {
1322 loop {
1323 match self.lexer.peek()?.token {
1324 Token::Eof => break,
1325 Token::Next => {
1326 self.lexer.consume_peeked();
1327 break;
1328 }
1329 _ => {
1330 self.lexer.consume_peeked();
1331 }
1332 }
1333 }
1334 self.reset()
1335 }
1336
1337 /// Parses the optional parameter list that may appear after a `FUNCTION` or `SUB` definition,
1338 /// including the opening and closing parenthesis.

Callers 1

parse_oneMethod · 0.80

Calls 3

consume_peekedMethod · 0.80
peekMethod · 0.45
resetMethod · 0.45

Tested by

no test coverage detected