Add mode::parser::parse_all method

This commit is contained in:
Nathan Fisher 2023-01-16 00:45:17 -05:00
parent 735c5bb8e8
commit bee6cdf08e

View File

@ -237,6 +237,13 @@ impl Parser {
self.reset(); self.reset();
Ok(self.mode) Ok(self.mode)
} }
pub fn parse_all(&mut self, value: &str) -> Result<u32, ParseError> {
for seg in value.split(',') {
self.parse(seg);
}
Ok(self.mode())
}
} }
#[cfg(test)] #[cfg(test)]