MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / read_word

Method read_word

atomic-core/src/diff/token/tokenizer.rs:260–270  ·  view source on GitHub ↗

Read a word token (identifier/keyword).

(&mut self)

Source from the content-addressed store, hash-verified

258
259 /// Read a word token (identifier/keyword).
260 fn read_word(&mut self) -> Token<'a> {
261 let start = self.position;
262 while let Some(b) = self.peek() {
263 if Self::is_word_char(b) {
264 self.advance();
265 } else {
266 break;
267 }
268 }
269 Token::new(&self.content[start..self.position], TokenKind::Word, start)
270 }
271
272 /// Read a whitespace token.
273 fn read_whitespace(&mut self) -> Token<'a> {

Callers 1

nextMethod · 0.80

Calls 2

peekMethod · 0.45
advanceMethod · 0.45

Tested by

no test coverage detected