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

Method start_token

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

Mark the current position of the cursor as the start of the token which is going to be lexed. Use [`Cursor::token_len`] to get the length of the lexed token.

(&mut self)

Source from the content-addressed store, hash-verified

80 ///
81 /// Use [`Cursor::token_len`] to get the length of the lexed token.
82 pub(super) fn start_token(&mut self) {
83 self.source_length = self.text_len();
84 }
85
86 /// Returns `true` if the cursor is at the end of file.
87 pub(super) fn is_eof(&self) -> bool {

Callers 3

next_tokenMethod · 0.80
lex_tokenMethod · 0.80
handle_indentationMethod · 0.80

Calls 1

text_lenMethod · 0.45

Tested by

no test coverage detected