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

Method bump

crates/sith_python_parser/src/token_source.rs:119–123  ·  view source on GitHub ↗

Bumps the token source to the next non-trivia token. It pushes the given kind to the token vector with the current token range.

(&mut self, kind: TokenKind)

Source from the content-addressed store, hash-verified

117 ///
118 /// It pushes the given kind to the token vector with the current token range.
119 pub(crate) fn bump(&mut self, kind: TokenKind) {
120 self.tokens
121 .push(Token::new(kind, self.current_range(), self.current_flags()));
122 self.do_bump();
123 }
124
125 /// Bumps the token source to the next non-trivia token without adding the current token to the
126 /// token vector. It does add the trivia tokens to the token vector.

Callers 10

lex_tokenMethod · 0.45
eat_indentationMethod · 0.45
skip_whitespaceMethod · 0.45
lex_identifierMethod · 0.45
lex_stringMethod · 0.45
lex_decimal_numberMethod · 0.45
radix_runMethod · 0.45

Calls 4

pushMethod · 0.45
current_rangeMethod · 0.45
current_flagsMethod · 0.45
do_bumpMethod · 0.45

Tested by

no test coverage detected