MCPcopy Index your code
hub / github.com/RustPython/RustPython / parse

Method parse

crates/common/src/format.rs:44–52  ·  view source on GitHub ↗
(text: &Wtf8)

Source from the content-addressed store, hash-verified

42
43impl FormatParse for FormatConversion {
44 fn parse(text: &Wtf8) -> (Option<Self>, &Wtf8) {
45 let Some(conversion) = Self::from_string(text) else {
46 return (None, text);
47 };
48 let mut chars = text.code_points();
49 chars.next(); // Consume the bang
50 chars.next(); // Consume one r,s,a char
51 (Some(conversion), chars.as_wtf8())
52 }
53}
54
55impl FormatConversion {

Callers 1

parse_usizeFunction · 0.45

Calls 13

parse_usizeFunction · 0.85
newFunction · 0.85
code_pointsMethod · 0.80
collectMethod · 0.80
SomeClass · 0.50
NumberClass · 0.50
_parseFunction · 0.50
IndexClass · 0.50
nextMethod · 0.45
as_wtf8Method · 0.45
as_refMethod · 0.45
is_emptyMethod · 0.45

Tested by

no test coverage detected