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

Method push_error

crates/sith_python_parser/src/lexer.rs:139–143  ·  view source on GitHub ↗

Helper function to push the given error, updating the current range with the error location and return the [`TokenKind::Unknown`] token.

(&mut self, error: LexicalError)

Source from the content-addressed store, hash-verified

137 /// Helper function to push the given error, updating the current range with the error location
138 /// and return the [`TokenKind::Unknown`] token.
139 fn push_error(&mut self, error: LexicalError) -> TokenKind {
140 self.current_range = error.location();
141 self.errors.push(error);
142 TokenKind::Unknown
143 }
144
145 /// Lex the next token.
146 pub fn next_token(&mut self) -> TokenKind {

Callers 9

lex_tokenMethod · 0.80
eat_indentationMethod · 0.80
handle_indentationMethod · 0.80
lex_stringMethod · 0.80
lex_number_radixMethod · 0.80
lex_decimal_numberMethod · 0.80
consume_endMethod · 0.80

Calls 2

locationMethod · 0.80
pushMethod · 0.45

Tested by

no test coverage detected