Now we take all these simple parsers and connect them. We can now parse half of our language!
(i: &'a str)
| 194 | /// Now we take all these simple parsers and connect them. |
| 195 | /// We can now parse half of our language! |
| 196 | fn 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 |
| 206 | fn parse_constant<'a>(i: &'a str) -> IResult<&'a str, Expr, VerboseError<&'a str>> { |
nothing calls this directly
no outgoing calls
no test coverage detected