MCPcopy Create free account
hub / github.com/LaBatata101/sith-language-server / compute_position

Method compute_position

crates/sith_python_parser/src/string.rs:81–83  ·  view source on GitHub ↗
(&self, cursor: usize)

Source from the content-addressed store, hash-verified

79 /// Computes the position of the cursor considering the offset.
80 #[inline]
81 fn compute_position(&self, cursor: usize) -> TextSize {
82 self.offset + TextSize::try_from(cursor).unwrap()
83 }
84
85 /// Returns the next byte in the string, if there is one.
86 ///

Callers 3

positionMethod · 0.80
parse_unicode_nameMethod · 0.80
parse_bytesMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected