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

Method peek

crates/ruff_python_parser/src/parser/mod.rs:357–359  ·  view source on GitHub ↗

Returns the next token kind without consuming it.

(&mut self)

Source from the content-addressed store, hash-verified

355
356 /// Returns the next token kind without consuming it.
357 fn peek(&mut self) -> TokenKind {
358 self.tokens.peek()
359 }
360
361 /// Returns the next two token kinds without consuming it.
362 fn peek2(&mut self) -> (TokenKind, TokenKind) {

Calls

no outgoing calls

Tested by

no test coverage detected