| 1008 | } |
| 1009 | |
| 1010 | fn search_info_charset<S: StrDrive>( |
| 1011 | req: &mut Request<'_, S>, |
| 1012 | state: &mut State, |
| 1013 | mut ctx: MatchContext, |
| 1014 | ) -> bool { |
| 1015 | let set = &ctx.pattern(req)[5..]; |
| 1016 | |
| 1017 | ctx.skip_code_from(req, 1); |
| 1018 | |
| 1019 | req.must_advance = false; |
| 1020 | |
| 1021 | loop { |
| 1022 | while !ctx.at_end(req) && !charset(set, ctx.peek_char::<S>()) { |
| 1023 | ctx.advance_char::<S>(); |
| 1024 | } |
| 1025 | if ctx.at_end(req) { |
| 1026 | return false; |
| 1027 | } |
| 1028 | |
| 1029 | req.start = ctx.cursor.position; |
| 1030 | state.start = ctx.cursor.position; |
| 1031 | state.cursor = ctx.cursor; |
| 1032 | |
| 1033 | if _match(req, state, ctx) { |
| 1034 | return true; |
| 1035 | } |
| 1036 | |
| 1037 | ctx.advance_char::<S>(); |
| 1038 | state.marks.clear(); |
| 1039 | } |
| 1040 | } |
| 1041 | |
| 1042 | #[derive(Debug, Clone, Copy)] |
| 1043 | struct RepeatContext { |