MCPcopy Create free account
hub / github.com/LibertyOS-Development/kernel / parse

Method parse

src/data/parse/json.rs:90–102  ·  view source on GitHub ↗
(input: &I, current: I::Pos, _context: &ParseContext)

Source from the content-addressed store, hash-verified

88 type Output = char;
89
90 fn parse(input: &I, current: I::Pos, _context: &ParseContext) -> ResultOf<I, Self::Output>
91 {
92 let (c, next) = input.next(current).map_err(|e| e.new_cause(current, "ExpectCharacter"))?;
93
94 if P::evaluate(&c)
95 {
96 Ok((c, next))
97 }
98 else
99 {
100 Err(input.err_at(current, "ExpectCharacter"))
101 }
102 }
103}
104
105pub struct Null;

Callers 1

execFunction · 0.80

Calls 5

new_causeMethod · 0.80
err_atMethod · 0.80
ErrEnum · 0.50
nextMethod · 0.45
mapMethod · 0.45

Tested by

no test coverage detected