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

Method python_location

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

Source from the content-addressed store, hash-verified

124 }
125
126 pub const fn python_location(&self) -> (usize, usize) {
127 if let Some(location) = self.location() {
128 (location.line.get(), location.character_offset.get())
129 } else {
130 (0, 0)
131 }
132 }
133
134 pub fn python_end_location(&self) -> Option<(usize, usize)> {
135 match self {

Callers 1

Calls 2

locationMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected