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

Method to_source_location

crates/vm/src/stdlib/_ast.rs:108–113  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

106
107impl PySourceLocation {
108 const fn to_source_location(&self) -> SourceLocation {
109 SourceLocation {
110 line: self.row.get_one_indexed(),
111 character_offset: self.column.get_one_indexed(),
112 }
113 }
114}
115
116/// A one-based index into the lines.

Callers 3

parseFunction · 0.80
parse_func_typeFunction · 0.80

Calls 1

get_one_indexedMethod · 0.80

Tested by

no test coverage detected