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

Method is_empty

crates/ruff_python_parser/src/parser/scratch_buffer.rs:29–35  ·  view source on GitHub ↗
(&self, snapshot: &ScratchSnapshot)

Source from the content-addressed store, hash-verified

27
28 #[inline]
29 pub(super) fn is_empty(&self, snapshot: &ScratchSnapshot) -> bool {
30 debug_assert!(
31 self.buffer.len() >= snapshot.len,
32 "Scratch buffer snapshots must be restored in reverse order of creation."
33 );
34 self.buffer.len() == snapshot.len
35 }
36
37 #[inline]
38 pub(super) fn snapshot(&self) -> ScratchSnapshot {

Callers 15

fmtMethod · 0.45
lex_validFunction · 0.45
has_valid_syntaxMethod · 0.45
has_no_syntax_errorsMethod · 0.45
visit_exprMethod · 0.45
is_eofMethod · 0.45
finishMethod · 0.45

Calls 1

lenMethod · 0.45

Tested by

no test coverage detected