MCPcopy Create free account
hub / github.com/aiscriptdev/aiscript / advance

Method advance

aiscript-lexer/src/lib.rs:262–270  ·  view source on GitHub ↗

Advances the scanner one character forward

(&mut self)

Source from the content-addressed store, hash-verified

260
261 // Advances the scanner one character forward
262 fn advance(&mut self) -> Option<char> {
263 match self.iter.next() {
264 Some((pos, ch)) => {
265 self.current = pos + ch.len_utf8();
266 Some(ch)
267 }
268 None => None,
269 }
270 }
271
272 // Peeks at the next character without consuming it
273 fn peek(&mut self) -> Option<char> {

Callers 15

skip_white_spacesMethod · 0.80
scan_docstringMethod · 0.80
scan_numberMethod · 0.80
consume_digitsMethod · 0.80
scan_identifierMethod · 0.80
scan_tokenMethod · 0.80
scan_fstringMethod · 0.80
scan_stringMethod · 0.80
read_raw_scriptMethod · 0.80
consumeMethod · 0.80
consume_eitherMethod · 0.80
match_tokenMethod · 0.80

Calls 2

error_at_currentMethod · 0.80
nextMethod · 0.45

Tested by

no test coverage detected