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

Method new

crates/ruff_python_parser/src/error.rs:352–354  ·  view source on GitHub ↗

Creates a new `LexicalError` with the given error type and location.

(error: LexicalErrorType, location: TextRange)

Source from the content-addressed store, hash-verified

350impl LexicalError {
351 /// Creates a new `LexicalError` with the given error type and location.
352 pub fn new(error: LexicalErrorType, location: TextRange) -> Self {
353 Self { error, location }
354 }
355
356 pub fn error(&self) -> &LexicalErrorType {
357 &self.error

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected