| 1 | use craterust-analyzer cargo xml-rs 0.8.19 crate/::readerrust-analyzer cargo xml-rs 0.8.19 reader/::errorrust-analyzer cargo xml-rs 0.8.19 reader/error/::SyntaxErrorrust-analyzer cargo xml-rs 0.8.19 reader/error/SyntaxError#; |
| 2 | use craterust-analyzer cargo xml-rs 0.8.19 crate/::readerrust-analyzer cargo xml-rs 0.8.19 reader/::eventsrust-analyzer cargo xml-rs 0.8.19 reader/events/::XmlEventrust-analyzer cargo xml-rs 0.8.19 reader/events/XmlEvent#; |
| 3 | use craterust-analyzer cargo xml-rs 0.8.19 crate/::readerrust-analyzer cargo xml-rs 0.8.19 reader/::lexerrust-analyzer cargo xml-rs 0.8.19 reader/lexer/::Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#; |
| 4 | |
| 5 | use superrust-analyzer cargo xml-rs 0.8.19 reader/parser/::{PullParserrust-analyzer cargo xml-rs 0.8.19 reader/parser/PullParser#, Resultrust-analyzer cargo xml-rs 0.8.19 reader/parser/Result#, Staterust-analyzer cargo xml-rs 0.8.19 reader/parser/State#}; |
| 6 | |
| 7 | impl PullParserrust-analyzer cargo xml-rs 0.8.19 reader/parser/PullParser# { |
| 8 | pub fn inside_commentrust-analyzer cargo xml-rs 0.8.19 reader/parser/inside_comment/impl#[PullParser]inside_comment().(&mut self, t: Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#) -> Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<Resultrust-analyzer cargo xml-rs 0.8.19 reader/parser/Result#> { |
| 9 | match t { |
| 10 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::CommentEndrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#CommentEnd# if self.configrust-analyzer cargo xml-rs 0.8.19 reader/parser/PullParser#config..crust-analyzer cargo xml-rs 0.8.19 reader/config/ParserConfig2#c..ignore_commentsrust-analyzer cargo xml-rs 0.8.19 reader/config/ParserConfig#ignore_comments. => { |
| 11 | self.into_state_continuerust-analyzer cargo xml-rs 0.8.19 reader/parser/impl#[PullParser]into_state_continue().(Staterust-analyzer cargo xml-rs 0.8.19 reader/parser/State#::OutsideTagrust-analyzer cargo xml-rs 0.8.19 reader/parser/State#OutsideTag#) |
| 12 | } |
| 13 | |
| 14 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::CommentEndrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#CommentEnd# => { |
| 15 | let data = self.take_bufrust-analyzer cargo xml-rs 0.8.19 reader/parser/impl#[PullParser]take_buf().(); |
| 16 | self.into_state_emitrust-analyzer cargo xml-rs 0.8.19 reader/parser/impl#[PullParser]into_state_emit().(Staterust-analyzer cargo xml-rs 0.8.19 reader/parser/State#::OutsideTagrust-analyzer cargo xml-rs 0.8.19 reader/parser/State#OutsideTag#, Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(XmlEventrust-analyzer cargo xml-rs 0.8.19 reader/events/XmlEvent#::Commentrust-analyzer cargo xml-rs 0.8.19 reader/events/XmlEvent#Comment#(data))) |
| 17 | } |
| 18 | |
| 19 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::Characterrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#Character#(c) if !rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[bool][Not]not().self.is_valid_xml_charrust-analyzer cargo xml-rs 0.8.19 reader/parser/impl#[PullParser]is_valid_xml_char().(c) => { |
| 20 | Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(self.errorrust-analyzer cargo xml-rs 0.8.19 reader/parser/impl#[PullParser]error().(SyntaxErrorrust-analyzer cargo xml-rs 0.8.19 reader/error/SyntaxError#::InvalidCharacterEntityrust-analyzer cargo xml-rs 0.8.19 reader/error/SyntaxError#InvalidCharacterEntity#(c as u32))) |
| 21 | }, |
| 22 | |
| 23 | _ if self.configrust-analyzer cargo xml-rs 0.8.19 reader/parser/PullParser#config..crust-analyzer cargo xml-rs 0.8.19 reader/config/ParserConfig2#c..ignore_commentsrust-analyzer cargo xml-rs 0.8.19 reader/config/ParserConfig#ignore_comments. => Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#, // Do not modify buffer if ignoring the comment |
| 24 | |
| 25 | _ => { |
| 26 | if self.bufrust-analyzer cargo xml-rs 0.8.19 reader/parser/PullParser#buf..lenrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/impl#[String]len().() rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialOrd<Self>`]gt().>rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialOrd<Self>`]gt(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialOrd<Self>`]gt().self.configrust-analyzer cargo xml-rs 0.8.19 reader/parser/PullParser#config..max_data_lengthrust-analyzer cargo xml-rs 0.8.19 reader/config/ParserConfig2#max_data_length. { |
| 27 | return Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(self.errorrust-analyzer cargo xml-rs 0.8.19 reader/parser/impl#[PullParser]error().(SyntaxErrorrust-analyzer cargo xml-rs 0.8.19 reader/error/SyntaxError#::ExceededConfiguredLimitrust-analyzer cargo xml-rs 0.8.19 reader/error/SyntaxError#ExceededConfiguredLimit#)); |
| 28 | } |
| 29 | t.push_to_stringrust-analyzer cargo xml-rs 0.8.19 reader/lexer/impl#[Token]push_to_string().(&mut self.bufrust-analyzer cargo xml-rs 0.8.19 reader/parser/PullParser#buf.); |
| 30 | Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None# |
| 31 | } |
| 32 | } |
| 33 | } |
| 34 | } |