MCPcopy Index your code
hub / github.com/RustPython/RustPython / location

Method location

crates/compiler/src/lib.rs:119–124  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

117 }
118
119 pub const fn location(&self) -> Option<SourceLocation> {
120 match self {
121 Self::Codegen(codegen_error) => codegen_error.location,
122 Self::Parse(parse_error) => Some(parse_error.location),
123 }
124 }
125
126 pub const fn python_location(&self) -> (usize, usize) {
127 if let Some(location) = self.location() {

Callers 5

syntax_errFunction · 0.45
python_locationMethod · 0.45
cert_to_dictFunction · 0.45
label_exception_targetsFunction · 0.45

Calls 1

SomeClass · 0.50

Tested by

no test coverage detected