fn accept(&mut self, valid: &str) -> bool {
        match self.peek() {
            Some(ch) => {
                if valid.contains(ch) {
                    // consume the character
                    self.next();
                    true
                } else {
                    false
                }
            }
            None => false,
        }
    }
/// `accept` consumes the next rune if it's from the valid set.
`accept` consumes the next rune if it's from the valid set.
` accept ` consumes the next rune if it ' s from the valid set .
fn accept(&mut self, valid: &str) -> bool {
        match self.peek() {
            Some(ch) => {
                if valid.contains(ch) {
                    // consume the character
                    self.next();
                    true
                } else {
                    false
                }
            }
            None => false,
        }
    }
fn accept ( & mut self , valid : & str ) -> bool { match self . peek ( ) { Some ( ch ) => { if valid . contains ( ch ) { // consume the character self . next ( ) ; true } else { false } } None => false , } }
`accept` consumes the next rune if it's from the valid set.
` accept ` consumes the next rune if it ' s from the valid set .
&mut self
valid
&str