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

Function parse_unchecked

crates/sith_python_parser/src/lib.rs:220–222  ·  view source on GitHub ↗

Parse the given Python source code using the specified [`Mode`]. This is same as the [`parse`] function except that it doesn't check for any [`ParseError`] and returns the [`Parsed`] as is.

(source: &str, mode: Mode)

Source from the content-addressed store, hash-verified

218/// This is same as the [`parse`] function except that it doesn't check for any [`ParseError`]
219/// and returns the [`Parsed`] as is.
220pub fn parse_unchecked(source: &str, mode: Mode) -> Parsed<Mod> {
221 Parser::new(source, mode).parse()
222}
223
224/// Parse the given Python source code using the specified [`PySourceType`].
225pub fn parse_unchecked_source(source: &str, source_type: PySourceType) -> Parsed<ModModule> {

Callers 5

parseFunction · 0.85
test_valid_syntaxFunction · 0.85
test_invalid_syntaxFunction · 0.85
parser_quick_testFunction · 0.85
parse_exprFunction · 0.85

Calls 1

parseMethod · 0.45

Tested by 3

test_valid_syntaxFunction · 0.68
test_invalid_syntaxFunction · 0.68
parser_quick_testFunction · 0.68