MCPcopy Create free account
hub / github.com/chc4/lineiform / parse_atom

Function parse_atom

src/parser.rs:196–203  ·  view source on GitHub ↗

Now we take all these simple parsers and connect them. We can now parse half of our language!

(i: &'a str)

Source from the content-addressed store, hash-verified

194/// Now we take all these simple parsers and connect them.
195/// We can now parse half of our language!
196fn parse_atom<'a>(i: &'a str) -> IResult<&'a str, Atom, VerboseError<&'a str>> {
197 alt((
198 parse_num,
199 parse_bool,
200 map(parse_builtin, Atom::BuiltIn),
201 parse_keyword,
202 ))(i)
203}
204
205/// We then add the Expr layer on top
206fn parse_constant<'a>(i: &'a str) -> IResult<&'a str, Expr, VerboseError<&'a str>> {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected