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

Function lex_invalid

crates/ruff_python_parser/src/lexer.rs:1677–1686  ·  view source on GitHub ↗
(source: &str, mode: Mode)

Source from the content-addressed store, hash-verified

1675
1676 #[track_caller]
1677 fn lex_invalid(source: &str, mode: Mode) -> LexerOutput {
1678 let output = lex(source, mode, TextSize::default());
1679
1680 assert!(
1681 !output.errors.is_empty(),
1682 "Expected lexer to generate at least one error for the following source:\n{source}"
1683 );
1684
1685 output
1686 }
1687
1688 #[track_caller]
1689 fn lex_source(source: &str) -> LexerOutput {

Callers 3

line_continuation_at_eofFunction · 0.85
test_infinite_loopFunction · 0.85

Calls 2

lexFunction · 0.85
defaultFunction · 0.50

Tested by 1

test_infinite_loopFunction · 0.68