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

Method do_bump

crates/sith_python_parser/src/token_source.rs:127–137  ·  view source on GitHub ↗

Bumps the token source to the next non-trivia token without adding the current token to the token vector. It does add the trivia tokens to the token vector.

(&mut self)

Source from the content-addressed store, hash-verified

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.
127 fn do_bump(&mut self) {
128 loop {
129 let kind = self.lexer.next_token();
130 if kind.is_trivia() {
131 self.tokens
132 .push(Token::new(kind, self.current_range(), self.current_flags()));
133 continue;
134 }
135 break;
136 }
137 }
138
139 /// Returns the next non-trivia token without adding it to the token vector.
140 fn next_non_trivia_token(&mut self) -> TokenKind {

Callers 2

from_sourceMethod · 0.45
bumpMethod · 0.45

Calls 5

next_tokenMethod · 0.80
is_triviaMethod · 0.80
pushMethod · 0.45
current_rangeMethod · 0.45
current_flagsMethod · 0.45

Tested by

no test coverage detected