Don't Use "rest" With "many1" In Rust's nom Parsing Crate
Note
I'm still working to figure this out...
This one works.
use alt;
use tag;
use take_until;
use multispace0;
use rest;
use many1;
use terminated;
use IResult;
Earlier notes about what wasn't working
Need to do a little more verification, but I think part of the problems I've been running into with nom and the [TODO: Code shorthand span ] functions is because I was pulling in content below them with [TODO: Code shorthand span ]. The way [TODO: Code shorthand span ] and [TODO: Code shorthand span ] work is that the stop processing when they hit an error. By using [TODO: Code shorthand span ] to slurp the rest of the content that wasn't happening.
This is some code where I figured that out
use alt;
use tag;
use take_until;
use multispace0;
use rest;
use many1;
use terminated;
use IResult;
Notes
-
I don't know if [TODO: Code shorthand span ] always returns true or not, but it certinaly seems like it might.
~ fin ~