fn parse_special_tag(&mut self, token: &mut TagToken) {
        assert_eq!(self.base_parser.consume_char(), ':');
        match token.name.as_str() {
            "rating" => {
                let rating_string = self.base_parser.consume_while(valid_rating);
                token.tag_type = TagType::Rating(self.get_rating(&rating_string));
            }
            "id" => {
                token.tag_type = TagType::Id(Some(
                    self.base_parser
                        .consume_while(valid_id)
                        .parse::<i64>()
                        .unwrap_or_default(),
                ));
            }
            "user" => {
                token.tag_type = TagType::User(Some(self.base_parser.consume_while(valid_user)));
            }
            _ => {}
        };
    }
/// Parses special tag and updates token with the appropriate type and value.
///
/// # Panic
/// If identifier doesn't match with any of the match arms, it will fail and throw an `Error`.
Parses special tag and updates token with the appropriate type and value.
Parses special tag and updates token with the appropriate type and value .
fn parse_special_tag(&mut self, token: &mut TagToken) {
        assert_eq!(self.base_parser.consume_char(), ':');
        match token.name.as_str() {
            "rating" => {
                let rating_string = self.base_parser.consume_while(valid_rating);
                token.tag_type = TagType::Rating(self.get_rating(&rating_string));
            }
            "id" => {
                token.tag_type = TagType::Id(Some(
                    self.base_parser
                        .consume_while(valid_id)
                        .parse::<i64>()
                        .unwrap_or_default(),
                ));
            }
            "user" => {
                token.tag_type = TagType::User(Some(self.base_parser.consume_while(valid_user)));
            }
            _ => {}
        };
    }
fn parse_special_tag ( & mut self , token : & mut TagToken ) { assert_eq ! ( self base_parser consume_char ( ) ':' ) ; match token . name . as_str ( ) { " " => { let rating_string = self . base_parser . consume_while ( valid_rating ) ; token . tag_type = TagType :: Rating ( self . get_rating ( & rating_string ) ) ; } " " => { token . tag_type = TagType :: Id ( Some ( self . base_parser . consume_while ( valid_id ) . parse :: < i64 > ( ) . unwrap_or_default ( ) , ) ) ; } " " => { token . tag_type = TagType :: User ( Some ( self . base_parser . consume_while ( valid_user ) ) ) ; } _ => { } } ; }
Parses special tag and updates token with the appropriate type and value.
Parses special tag and updates token with the appropriate type and value .
&mut self
token
&mut TagToken
&mut self
token
&mut TagToken
panic
If identifier doesn't match with any of the match arms, it will fail and throw an `Error`.
If identifier doesn ' t match with any of the match arms it will fail and throw an ` Error ` .