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

Method new

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

Create a new parser for the given source code.

(source: &'src str, options: ParseOptions)

Source from the content-addressed store, hash-verified

118impl<'src> Parser<'src> {
119 /// Create a new parser for the given source code.
120 pub(crate) fn new(source: &'src str, options: ParseOptions) -> Self {
121 Parser::new_starts_at(source, TextSize::new(0), options)
122 }
123
124 /// Create a new parser for the given source code which starts parsing at the given offset.
125 pub(crate) fn new_starts_at(

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected