MCPcopy Create free account
hub / github.com/astral-sh/ruff / assert_progressing

Method assert_progressing

crates/ruff_python_parser/src/parser/progress.rs:35–45  ·  view source on GitHub ↗
(&mut self, p: &Parser)

Source from the content-addressed store, hash-verified

33 /// Panics if the parser hasn't progressed since the last call.
34 #[inline]
35 pub(super) fn assert_progressing(&mut self, p: &Parser) {
36 assert!(
37 self.has_progressed(p),
38 "The parser is no longer progressing. Stuck at '{}' {:?}:{:?}",
39 p.src_text(p.current_token_range()),
40 p.current_token_kind(),
41 p.current_token_range(),
42 );
43
44 self.0 = Some(p.current_token_id());
45 }
46}

Calls 1

current_token_idMethod · 0.80

Tested by

no test coverage detected