2019-12-25 21:47:18 -05:00
|
|
|
use crate::err::ProcessingResult;
|
2019-12-29 05:53:49 -05:00
|
|
|
use crate::proc::Processor;
|
2019-12-25 04:44:51 -05:00
|
|
|
|
2019-12-25 21:47:18 -05:00
|
|
|
pub fn process_bang(proc: &mut Processor) -> ProcessingResult<()> {
|
2020-01-04 21:28:34 -05:00
|
|
|
if cfg!(debug_assertions) {
|
|
|
|
chain!(proc.match_seq(b"<!").expect().keep());
|
|
|
|
} else {
|
|
|
|
proc.skip_amount_expect(2);
|
|
|
|
};
|
2019-12-25 04:44:51 -05:00
|
|
|
|
2019-12-25 07:29:18 -05:00
|
|
|
chain!(proc.match_while_not_char(b'>').keep());
|
2019-12-25 04:44:51 -05:00
|
|
|
|
2019-12-25 07:29:18 -05:00
|
|
|
chain!(proc.match_char(b'>').require()?.keep());
|
2019-12-25 04:44:51 -05:00
|
|
|
|
|
|
|
Ok(())
|
|
|
|
}
|