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

Method token_len

crates/sith_python_parser/src/lexer/cursor.rs:74–76  ·  view source on GitHub ↗

Returns the length of the current token length. This is to be used after setting the start position of the token using [`Cursor::start_token`].

(&self)

Source from the content-addressed store, hash-verified

72 /// This is to be used after setting the start position of the token using
73 /// [`Cursor::start_token`].
74 pub(super) fn token_len(&self) -> TextSize {
75 self.source_length - self.text_len()
76 }
77
78 /// Mark the current position of the cursor as the start of the token which is going to be
79 /// lexed.

Callers 1

token_rangeMethod · 0.80

Calls 1

text_lenMethod · 0.45

Tested by

no test coverage detected