MCPcopy Create free account
hub / github.com/astral-sh/ruff / bump_complex

Method bump_complex

crates/ruff_python_parser/src/parser/mod.rs:431–437  ·  view source on GitHub ↗
(&mut self)

Source from the content-addressed store, hash-verified

429 }
430
431 fn bump_complex(&mut self) -> (f64, f64) {
432 let text = self.current_token_text();
433 let value = f64::from_str(&strip_underscores(&text[..text.len() - 1]))
434 .expect("lexer validated complex literal");
435 self.bump(TokenKind::Complex);
436 (0.0, value)
437 }
438
439 fn bump_string_value(&mut self) -> &'src str {
440 let range = self.current_token_range();

Callers 2

parse_atomMethod · 0.80

Calls 5

strip_underscoresFunction · 0.85
current_token_textMethod · 0.80
expectMethod · 0.80
lenMethod · 0.45
bumpMethod · 0.45

Tested by

no test coverage detected