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

Method parse

crates/common/src/cformat.rs:299–317  ·  view source on GitHub ↗
(iter: &mut ParseIter<I>)

Source from the content-addressed store, hash-verified

297
298impl<T: FormatBuf> CFormatSpecKeyed<T> {
299 pub fn parse<I>(iter: &mut ParseIter<I>) -> Result<Self, ParsingError>
300 where
301 I: Iterator<Item = T::Char>,
302 {
303 let mapping_key = parse_spec_mapping_key(iter)?;
304 let flags = parse_flags(iter);
305 let min_field_width = parse_quantity(iter)?;
306 let precision = parse_precision(iter)?;
307 consume_length(iter);
308 let format_type = parse_format_type(iter)?;
309
310 let spec = CFormatSpec {
311 flags,
312 min_field_width,
313 precision,
314 format_type,
315 };
316 Ok(Self { mapping_key, spec })
317 }
318}
319
320impl CFormatSpec {

Callers

nothing calls this directly

Calls 15

parse_spec_mapping_keyFunction · 0.85
parse_flagsFunction · 0.85
parse_quantityFunction · 0.85
consume_lengthFunction · 0.85
parse_format_typeFunction · 0.85
takeFunction · 0.85
SpecClass · 0.85
eq_charMethod · 0.80
parse_precisionFunction · 0.70
LiteralClass · 0.50
parseFunction · 0.50
ErrClass · 0.50

Tested by

no test coverage detected