MCPcopy Create free account
hub / github.com/LaBatata101/sith-language-server / lex

Function lex

crates/sith_python_parser/src/lexer.rs:1671–1673  ·  view source on GitHub ↗

Create a new [`Lexer`] for the given source code and [`Mode`].

(source: &str, mode: Mode)

Source from the content-addressed store, hash-verified

1669
1670/// Create a new [`Lexer`] for the given source code and [`Mode`].
1671pub fn lex(source: &str, mode: Mode) -> Lexer {
1672 Lexer::new(source, mode, TextSize::default())
1673}
1674
1675#[cfg(test)]
1676mod tests {

Callers 7

lex_validFunction · 0.85
lex_invalidFunction · 0.85
get_tokens_onlyFunction · 0.85
lex_fstring_errorFunction · 0.85
ok_ipy_escape_commandFunction · 0.85
benchmark_lexerFunction · 0.85

Calls 7

next_tokenMethod · 0.80
is_eofMethod · 0.45
pushMethod · 0.45
take_valueMethod · 0.45
current_rangeMethod · 0.45
current_flagsMethod · 0.45
finishMethod · 0.45