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

Method take_value

crates/sith_python_parser/src/lexer.rs:133–135  ·  view source on GitHub ↗

Takes the token value corresponding to the current token out of the lexer, replacing it with the default value. All the subsequent call to this method without moving the lexer would always return the default value which is [`TokenValue::None`].

(&mut self)

Source from the content-addressed store, hash-verified

131 /// All the subsequent call to this method without moving the lexer would always return the
132 /// default value which is [`TokenValue::None`].
133 pub(crate) fn take_value(&mut self) -> TokenValue {
134 std::mem::take(&mut self.current_value)
135 }
136
137 /// Helper function to push the given error, updating the current range with the error location
138 /// and return the [`TokenKind::Unknown`] token.

Callers 2

lexFunction · 0.45
bump_valueMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected