Add mode::parser::parse_all method
This commit is contained in:
parent
735c5bb8e8
commit
bee6cdf08e
@ -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)]
|
||||||
|
Loading…
Reference in New Issue
Block a user