another example that needed to be fleshed out
@@ -167,7 +167,20 @@ impl<'i, R: RuleType> ParserState<'i, R> {
/// # Examples
///
/// ```
+ /// # use pest;
+ ///
+ /// # #[allow(non_camel_case_types)]
+ /// # #[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
+ /// enum Rule {
+ /// ab
+ /// }
///
+ /// let input = "abcde";
+ /// let mut state: Box<pest::ParserState<Rule>> = pest::ParserState::new(input);
+ /// let mut position = state.clone_position();
+ /// position.skip(3);
+ /// state = state.with_updated_position(position);
+ /// assert_eq!(state.get_position().pos(), 3);
/// ```
pub fn with_updated_position(mut self: Box<Self>, position: Position<'i>) -> Box<Self> {
self.position = position;
