| 1 | //! Contains simple lexer for XML documents. |
| 2 | //! |
| 3 | //! This module is for internal use. Use `xml::pull` module to do parsing. |
| 4 | |
| 5 | |
| 6 | use craterust-analyzer cargo xml-rs 0.8.19 crate/::readerrust-analyzer cargo xml-rs 0.8.19 reader/::ErrorKindrust-analyzer cargo xml-rs 0.8.19 reader/error/ErrorKind#; |
| 7 | 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#; |
| 8 | use stdrust-analyzer cargo std https://github.com/rust-lang/rust/library/std crate/::collectionsrust-analyzer cargo std https://github.com/rust-lang/rust/library/std collections/::VecDequerust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc collections/vec_deque/VecDeque#; |
| 9 | use stdrust-analyzer cargo std https://github.com/rust-lang/rust/library/std crate/::fmtrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc fmt/; |
| 10 | use stdrust-analyzer cargo std https://github.com/rust-lang/rust/library/std crate/::iorust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/::Readrust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/Read#; |
| 11 | use stdrust-analyzer cargo std https://github.com/rust-lang/rust/library/std crate/::resultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/; |
| 12 | use craterust-analyzer cargo xml-rs 0.8.19 crate/::commonrust-analyzer cargo xml-rs 0.8.19 common/::{is_name_charrust-analyzer cargo xml-rs 0.8.19 common/is_name_char()., is_whitespace_charrust-analyzer cargo xml-rs 0.8.19 common/is_whitespace_char()., Positionrust-analyzer cargo xml-rs 0.8.19 common/Position#, TextPositionrust-analyzer cargo xml-rs 0.8.19 common/TextPosition#, is_xml10_charrust-analyzer cargo xml-rs 0.8.19 common/is_xml10_char()., is_xml11_charrust-analyzer cargo xml-rs 0.8.19 common/is_xml11_char().}; |
| 13 | 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/Error#; |
| 14 | use craterust-analyzer cargo xml-rs 0.8.19 crate/::utilrust-analyzer cargo xml-rs 0.8.19 util/::{CharReaderrust-analyzer cargo xml-rs 0.8.19 util/CharReader#, Encodingrust-analyzer cargo xml-rs 0.8.19 util/Encoding#}; |
| 15 | |
| 16 | use superrust-analyzer cargo xml-rs 0.8.19 reader/::ParserConfig2rust-analyzer cargo xml-rs 0.8.19 reader/config/ParserConfig2#; |
| 17 | |
| 18 | /// `Token` represents a single lexeme of an XML document. These lexemes |
| 19 | /// are used to perform actual parsing. |
| 20 | #[deriverust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/derive:(Copyrust-analyzer cargo core https://github.com/rust-lang/rust/library/core marker/Copy:, Clonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core clone/Clone:, PartialEqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialEq:, Eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/Eq:, Debugrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/macros/Debug:)] |
| 21 | pub(craterust-analyzer cargo xml-rs 0.8.19 crate/) enum Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token# { |
| 22 | /// `<?` |
| 23 | ProcessingInstructionStartrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#ProcessingInstructionStart#, |
| 24 | /// `?>` |
| 25 | ProcessingInstructionEndrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#ProcessingInstructionEnd#, |
| 26 | /// `<!DOCTYPE |
| 27 | DoctypeStartrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#DoctypeStart#, |
| 28 | /// `<` |
| 29 | OpeningTagStartrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#OpeningTagStart#, |
| 30 | /// `</` |
| 31 | ClosingTagStartrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#ClosingTagStart#, |
| 32 | /// `>` |
| 33 | TagEndrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#TagEnd#, |
| 34 | /// `/>` |
| 35 | EmptyTagEndrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#EmptyTagEnd#, |
| 36 | /// `<!--` |
| 37 | CommentStartrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#CommentStart#, |
| 38 | /// `-->` |
| 39 | CommentEndrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#CommentEnd#, |
| 40 | /// Any non-special character except whitespace. |
| 41 | Characterrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#Character#(char), |
| 42 | /// `=` |
| 43 | EqualsSignrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#EqualsSign#, |
| 44 | /// `'` |
| 45 | SingleQuoterust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#SingleQuote#, |
| 46 | /// `"` |
| 47 | DoubleQuoterust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#DoubleQuote#, |
| 48 | /// `<![CDATA[` |
| 49 | CDataStartrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#CDataStart#, |
| 50 | /// `]]>` |
| 51 | CDataEndrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#CDataEnd#, |
| 52 | /// `&` |
| 53 | ReferenceStartrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#ReferenceStart#, |
| 54 | /// `;` |
| 55 | ReferenceEndrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#ReferenceEnd#, |
| 56 | /// `<!` of `ENTITY` |
| 57 | MarkupDeclarationStartrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#MarkupDeclarationStart#, |
| 58 | } |
| 59 | |
| 60 | impl fmtrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc fmt/::Displayrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/Display# for Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token# { |
| 61 | #[cold] |
| 62 | fn fmtrust-analyzer cargo xml-rs 0.8.19 reader/lexer/impl#[Token][Display]fmt().(&self, f: &mut fmtrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc fmt/::Formatterrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/Formatter#<'_>) -> fmtrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc fmt/::Resultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/Result# { |
| 63 | match *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/impl#[`&T`][Deref]deref().self { |
| 64 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::Characterrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#Character#(c) => c.fmtrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/impl#[char][Display]fmt().(f), |
| 65 | other => match other { |
| 66 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::OpeningTagStartrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#OpeningTagStart# => "<", |
| 67 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::ProcessingInstructionStartrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#ProcessingInstructionStart# => "<?", |
| 68 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::DoctypeStartrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#DoctypeStart# => "<!DOCTYPE", |
| 69 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::ClosingTagStartrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#ClosingTagStart# => "</", |
| 70 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::CommentStartrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#CommentStart# => "<!--", |
| 71 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::CDataStartrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#CDataStart# => "<![CDATA[", |
| 72 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::TagEndrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#TagEnd# => ">", |
| 73 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::EmptyTagEndrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#EmptyTagEnd# => "/>", |
| 74 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::ProcessingInstructionEndrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#ProcessingInstructionEnd# => "?>", |
| 75 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::CommentEndrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#CommentEnd# => "-->", |
| 76 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::CDataEndrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#CDataEnd# => "]]>", |
| 77 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::ReferenceStartrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#ReferenceStart# => "&", |
| 78 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::ReferenceEndrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#ReferenceEnd# => ";", |
| 79 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::EqualsSignrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#EqualsSign# => "=", |
| 80 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::SingleQuoterust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#SingleQuote# => "'", |
| 81 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::DoubleQuoterust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#DoubleQuote# => "\"", |
| 82 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::MarkupDeclarationStartrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#MarkupDeclarationStart# => "<!", |
| 83 | _ => unreachablerust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/unreachable!!() |
| 84 | }.fmtrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/impl#[str][Display]fmt().(f), |
| 85 | } |
| 86 | } |
| 87 | } |
| 88 | |
| 89 | impl Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token# { |
| 90 | pub fn as_static_strrust-analyzer cargo xml-rs 0.8.19 reader/lexer/impl#[Token]as_static_str().(&self) -> Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<&'static str> { |
| 91 | match *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/impl#[`&T`][Deref]deref().self { |
| 92 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::OpeningTagStartrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#OpeningTagStart# => Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#("<"), |
| 93 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::ProcessingInstructionStartrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#ProcessingInstructionStart# => Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#("<?"), |
| 94 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::DoctypeStartrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#DoctypeStart# => Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#("<!DOCTYPE"), |
| 95 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::ClosingTagStartrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#ClosingTagStart# => Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#("</"), |
| 96 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::CommentStartrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#CommentStart# => Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#("<!--"), |
| 97 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::CDataStartrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#CDataStart# => Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#("<![CDATA["), |
| 98 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::TagEndrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#TagEnd# => Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(">"), |
| 99 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::EmptyTagEndrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#EmptyTagEnd# => Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#("/>"), |
| 100 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::ProcessingInstructionEndrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#ProcessingInstructionEnd# => Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#("?>"), |
| 101 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::CommentEndrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#CommentEnd# => Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#("-->"), |
| 102 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::CDataEndrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#CDataEnd# => Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#("]]>"), |
| 103 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::ReferenceStartrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#ReferenceStart# => Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#("&"), |
| 104 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::ReferenceEndrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#ReferenceEnd# => Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(";"), |
| 105 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::EqualsSignrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#EqualsSign# => Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#("="), |
| 106 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::SingleQuoterust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#SingleQuote# => Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#("'"), |
| 107 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::DoubleQuoterust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#DoubleQuote# => Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#("\""), |
| 108 | _ => Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None# |
| 109 | } |
| 110 | } |
| 111 | |
| 112 | // using String.push_str(token.to_string()) is simply way too slow |
| 113 | pub fn push_to_stringrust-analyzer cargo xml-rs 0.8.19 reader/lexer/impl#[Token]push_to_string().(&self, target: &mut Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String#) { |
| 114 | match *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/impl#[`&T`][Deref]deref().self { |
| 115 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::Characterrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#Character#(c) => { |
| 116 | debug_assertrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/debug_assert!!(is_xml10_charrust-analyzer cargo xml-rs 0.8.19 common/is_xml10_char().(c) || is_xml11_charrust-analyzer cargo xml-rs 0.8.19 common/is_xml11_char().(c)); |
| 117 | target.pushrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/impl#[String]push().(c) |
| 118 | }, |
| 119 | _ => if let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(s) = self.as_static_strrust-analyzer cargo xml-rs 0.8.19 reader/lexer/impl#[Token]as_static_str().() { |
| 120 | target.push_strrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/impl#[String]push_str().(s); |
| 121 | } |
| 122 | } |
| 123 | } |
| 124 | } |
| 125 | |
| 126 | #[deriverust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/derive:(Copyrust-analyzer cargo core https://github.com/rust-lang/rust/library/core marker/Copy:, Clonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core clone/Clone:)] |
| 127 | enum Staterust-analyzer cargo xml-rs 0.8.19 reader/lexer/State# { |
| 128 | /// Default state |
| 129 | Normalrust-analyzer cargo xml-rs 0.8.19 reader/lexer/State#Normal#, |
| 130 | /// Triggered on '<' |
| 131 | TagStartedrust-analyzer cargo xml-rs 0.8.19 reader/lexer/State#TagStarted#, |
| 132 | /// Triggered on '<!' |
| 133 | CommentOrCDataOrDoctypeStartedrust-analyzer cargo xml-rs 0.8.19 reader/lexer/State#CommentOrCDataOrDoctypeStarted#, |
| 134 | /// Triggered on '<!-' |
| 135 | CommentStartedrust-analyzer cargo xml-rs 0.8.19 reader/lexer/State#CommentStarted#, |
| 136 | /// Triggered on '<!D' up to '<!DOCTYPE' |
| 137 | DoctypeStartedrust-analyzer cargo xml-rs 0.8.19 reader/lexer/State#DoctypeStarted#(DoctypeStartedSubstaterust-analyzer cargo xml-rs 0.8.19 reader/lexer/DoctypeStartedSubstate#), |
| 138 | /// Other items like `<!ELEMENT` in DTD |
| 139 | InsideMarkupDeclarationrust-analyzer cargo xml-rs 0.8.19 reader/lexer/State#InsideMarkupDeclaration#, |
| 140 | /// Triggered after DoctypeStarted to handle sub elements |
| 141 | InsideDoctyperust-analyzer cargo xml-rs 0.8.19 reader/lexer/State#InsideDoctype#, |
| 142 | /// Triggered on '<![' up to '<![CDATA' |
| 143 | CDataStartedrust-analyzer cargo xml-rs 0.8.19 reader/lexer/State#CDataStarted#(CDataStartedSubstaterust-analyzer cargo xml-rs 0.8.19 reader/lexer/CDataStartedSubstate#), |
| 144 | /// Triggered on '?' |
| 145 | ProcessingInstructionClosingrust-analyzer cargo xml-rs 0.8.19 reader/lexer/State#ProcessingInstructionClosing#, |
| 146 | /// Triggered on '/' |
| 147 | EmptyTagClosingrust-analyzer cargo xml-rs 0.8.19 reader/lexer/State#EmptyTagClosing#, |
| 148 | /// Triggered on '-' up to '--' |
| 149 | CommentClosingrust-analyzer cargo xml-rs 0.8.19 reader/lexer/State#CommentClosing#(ClosingSubstaterust-analyzer cargo xml-rs 0.8.19 reader/lexer/ClosingSubstate#), |
| 150 | /// Triggered on ']' up to ']]' inside CDATA |
| 151 | CDataClosingrust-analyzer cargo xml-rs 0.8.19 reader/lexer/State#CDataClosing#(ClosingSubstaterust-analyzer cargo xml-rs 0.8.19 reader/lexer/ClosingSubstate#), |
| 152 | /// Triggered on ']' up to ']]' outside CDATA |
| 153 | InvalidCDataClosingrust-analyzer cargo xml-rs 0.8.19 reader/lexer/State#InvalidCDataClosing#(ClosingSubstaterust-analyzer cargo xml-rs 0.8.19 reader/lexer/ClosingSubstate#), |
| 154 | /// After `<!--` |
| 155 | InsideCommentrust-analyzer cargo xml-rs 0.8.19 reader/lexer/State#InsideComment#, |
| 156 | /// After `<[[` |
| 157 | InsideCdatarust-analyzer cargo xml-rs 0.8.19 reader/lexer/State#InsideCdata#, |
| 158 | /// After `<?` |
| 159 | InsideProcessingInstructionrust-analyzer cargo xml-rs 0.8.19 reader/lexer/State#InsideProcessingInstruction#, |
| 160 | /// `<!ENTITY "here">` |
| 161 | InsideMarkupDeclarationQuotedStringrust-analyzer cargo xml-rs 0.8.19 reader/lexer/State#InsideMarkupDeclarationQuotedString#(QuoteStylerust-analyzer cargo xml-rs 0.8.19 reader/lexer/QuoteStyle#), |
| 162 | } |
| 163 | |
| 164 | #[deriverust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/derive:(Copyrust-analyzer cargo core https://github.com/rust-lang/rust/library/core marker/Copy:, Clonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core clone/Clone:, Eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/Eq:, PartialEqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialEq:)] |
| 165 | enum QuoteStylerust-analyzer cargo xml-rs 0.8.19 reader/lexer/QuoteStyle# { |
| 166 | Singlerust-analyzer cargo xml-rs 0.8.19 reader/lexer/QuoteStyle#Single#, Doublerust-analyzer cargo xml-rs 0.8.19 reader/lexer/QuoteStyle#Double# |
| 167 | } |
| 168 | |
| 169 | #[deriverust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/derive:(Copyrust-analyzer cargo core https://github.com/rust-lang/rust/library/core marker/Copy:, Clonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core clone/Clone:)] |
| 170 | enum ClosingSubstaterust-analyzer cargo xml-rs 0.8.19 reader/lexer/ClosingSubstate# { |
| 171 | Firstrust-analyzer cargo xml-rs 0.8.19 reader/lexer/ClosingSubstate#First#, Secondrust-analyzer cargo xml-rs 0.8.19 reader/lexer/ClosingSubstate#Second# |
| 172 | } |
| 173 | |
| 174 | #[deriverust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/derive:(Copyrust-analyzer cargo core https://github.com/rust-lang/rust/library/core marker/Copy:, Clonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core clone/Clone:)] |
| 175 | enum DoctypeStartedSubstaterust-analyzer cargo xml-rs 0.8.19 reader/lexer/DoctypeStartedSubstate# { |
| 176 | Drust-analyzer cargo xml-rs 0.8.19 reader/lexer/DoctypeStartedSubstate#D#, DOrust-analyzer cargo xml-rs 0.8.19 reader/lexer/DoctypeStartedSubstate#DO#, DOCrust-analyzer cargo xml-rs 0.8.19 reader/lexer/DoctypeStartedSubstate#DOC#, DOCTrust-analyzer cargo xml-rs 0.8.19 reader/lexer/DoctypeStartedSubstate#DOCT#, DOCTYrust-analyzer cargo xml-rs 0.8.19 reader/lexer/DoctypeStartedSubstate#DOCTY#, DOCTYPrust-analyzer cargo xml-rs 0.8.19 reader/lexer/DoctypeStartedSubstate#DOCTYP# |
| 177 | } |
| 178 | |
| 179 | #[deriverust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/derive:(Copyrust-analyzer cargo core https://github.com/rust-lang/rust/library/core marker/Copy:, Clonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core clone/Clone:)] |
| 180 | enum CDataStartedSubstaterust-analyzer cargo xml-rs 0.8.19 reader/lexer/CDataStartedSubstate# { |
| 181 | Erust-analyzer cargo xml-rs 0.8.19 reader/lexer/CDataStartedSubstate#E#, Crust-analyzer cargo xml-rs 0.8.19 reader/lexer/CDataStartedSubstate#C#, CDrust-analyzer cargo xml-rs 0.8.19 reader/lexer/CDataStartedSubstate#CD#, CDArust-analyzer cargo xml-rs 0.8.19 reader/lexer/CDataStartedSubstate#CDA#, CDATrust-analyzer cargo xml-rs 0.8.19 reader/lexer/CDataStartedSubstate#CDAT#, CDATArust-analyzer cargo xml-rs 0.8.19 reader/lexer/CDataStartedSubstate#CDATA# |
| 182 | } |
| 183 | |
| 184 | /// `Result` represents lexing result. It is either a token or an error message. |
| 185 | pub(craterust-analyzer cargo xml-rs 0.8.19 crate/) type Resultrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Result#<T = Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#>, E = Errorrust-analyzer cargo xml-rs 0.8.19 reader/error/Error#> = resultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/::Resultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#<T, E>; |
| 186 | |
| 187 | /// Helps to set up a dispatch table for lexing large unambigous tokens like |
| 188 | /// `<![CDATA[` or `<!DOCTYPE `. |
| 189 | macro_rules! dispatch_on_enum_staterust-analyzer cargo xml-rs 0.8.19 reader/lexer/dispatch_on_enum_state!( |
| 190 | ($_self:ident, $s:expr, $c:expr, $is:expr, |
| 191 | $($st:ident; $stc:expr ; $next_st:ident ; $chunk:expr),+; |
| 192 | $end_st:ident ; $end_c:expr ; $end_chunk:expr ; $e:expr) => ( |
| 193 | match $s { |
| 194 | $( |
| 195 | $st => match $c { |
| 196 | $stc => $_self.move_to($is($next_st)), |
| 197 | _ => $_self.handle_error($chunk, $c) |
| 198 | }, |
| 199 | )+ |
| 200 | $end_st => match $c { |
| 201 | $end_c => $e, |
| 202 | _ => $_self.handle_error($end_chunk, $c) |
| 203 | } |
| 204 | } |
| 205 | ) |
| 206 | ); |
| 207 | |
| 208 | /// `Lexer` is a lexer for XML documents, which implements pull API. |
| 209 | /// |
| 210 | /// Main method is `next_token` which accepts an `std::io::Read` instance and |
| 211 | /// tries to read the next lexeme from it. |
| 212 | /// |
| 213 | /// When `skip_errors` flag is set, invalid lexemes will be returned as `Chunk`s. |
| 214 | /// When it is not set, errors will be reported as `Err` objects with a string message. |
| 215 | /// By default this flag is not set. Use `enable_errors` and `disable_errors` methods |
| 216 | /// to toggle the behavior. |
| 217 | pub(craterust-analyzer cargo xml-rs 0.8.19 crate/) struct Lexerrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Lexer# { |
| 218 | strust-analyzer cargo xml-rs 0.8.19 reader/lexer/Lexer#st.: Staterust-analyzer cargo xml-rs 0.8.19 reader/lexer/State#, |
| 219 | readerrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Lexer#reader.: CharReaderrust-analyzer cargo xml-rs 0.8.19 util/CharReader#, |
| 220 | posrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Lexer#pos.: TextPositionrust-analyzer cargo xml-rs 0.8.19 common/TextPosition#, |
| 221 | head_posrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Lexer#head_pos.: TextPositionrust-analyzer cargo xml-rs 0.8.19 common/TextPosition#, |
| 222 | char_queuerust-analyzer cargo xml-rs 0.8.19 reader/lexer/Lexer#char_queue.: VecDequerust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc collections/vec_deque/VecDeque#<char>, |
| 223 | /// Default state to go back to after a tag end (may be `InsideDoctype`) |
| 224 | normal_staterust-analyzer cargo xml-rs 0.8.19 reader/lexer/Lexer#normal_state.: Staterust-analyzer cargo xml-rs 0.8.19 reader/lexer/State#, |
| 225 | inside_tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Lexer#inside_token.: bool, |
| 226 | eof_handledrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Lexer#eof_handled.: bool, |
| 227 | reparse_depthrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Lexer#reparse_depth.: u8, |
| 228 | #[cfg(test)] |
| 229 | skip_errorsrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Lexer#skip_errors.: bool, |
| 230 | |
| 231 | max_entity_expansion_depthrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Lexer#max_entity_expansion_depth.: u8, |
| 232 | max_entity_expansion_lengthrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Lexer#max_entity_expansion_length.: usize, |
| 233 | } |
| 234 | |
| 235 | impl Positionrust-analyzer cargo xml-rs 0.8.19 common/Position# for Lexerrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Lexer# { |
| 236 | #[inline] |
| 237 | /// Returns the position of the last token produced by the lexer |
| 238 | fn positionrust-analyzer cargo xml-rs 0.8.19 reader/lexer/impl#[Lexer][Position]position().(&self) -> TextPositionrust-analyzer cargo xml-rs 0.8.19 common/TextPosition# { self.posrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Lexer#pos. } |
| 239 | } |
| 240 | |
| 241 | impl Lexerrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Lexer# { |
| 242 | /// Returns a new lexer with default state. |
| 243 | pub(craterust-analyzer cargo xml-rs 0.8.19 crate/) fn newrust-analyzer cargo xml-rs 0.8.19 reader/lexer/impl#[Lexer]new().(config: &ParserConfig2rust-analyzer cargo xml-rs 0.8.19 reader/config/ParserConfig2#) -> Lexerrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Lexer# { |
| 244 | Lexerrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Lexer# { |
| 245 | readerrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Lexer#reader.: CharReaderrust-analyzer cargo xml-rs 0.8.19 util/CharReader#::newrust-analyzer cargo xml-rs 0.8.19 util/impl#[CharReader]new().(), |
| 246 | posrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Lexer#pos.: TextPositionrust-analyzer cargo xml-rs 0.8.19 common/TextPosition#::newrust-analyzer cargo xml-rs 0.8.19 common/impl#[TextPosition]new().(), |
| 247 | head_posrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Lexer#head_pos.: TextPositionrust-analyzer cargo xml-rs 0.8.19 common/TextPosition#::newrust-analyzer cargo xml-rs 0.8.19 common/impl#[TextPosition]new().(), |
| 248 | char_queuerust-analyzer cargo xml-rs 0.8.19 reader/lexer/Lexer#char_queue.: VecDequerust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc collections/vec_deque/VecDeque#::with_capacityrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc collections/vec_deque/impl#[`VecDeque<T>`]with_capacity().(4), // TODO: check size |
| 249 | strust-analyzer cargo xml-rs 0.8.19 reader/lexer/Lexer#st.: Staterust-analyzer cargo xml-rs 0.8.19 reader/lexer/State#::Normalrust-analyzer cargo xml-rs 0.8.19 reader/lexer/State#Normal#, |
| 250 | normal_staterust-analyzer cargo xml-rs 0.8.19 reader/lexer/Lexer#normal_state.: Staterust-analyzer cargo xml-rs 0.8.19 reader/lexer/State#::Normalrust-analyzer cargo xml-rs 0.8.19 reader/lexer/State#Normal#, |
| 251 | inside_tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Lexer#inside_token.: false, |
| 252 | eof_handledrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Lexer#eof_handled.: false, |
| 253 | reparse_depthrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Lexer#reparse_depth.: 0, |
| 254 | #[cfg(test)] |
| 255 | skip_errorsrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Lexer#skip_errors.: false, |
| 256 | |
| 257 | max_entity_expansion_depthrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Lexer#max_entity_expansion_depth.: config.max_entity_expansion_depthrust-analyzer cargo xml-rs 0.8.19 reader/config/ParserConfig2#max_entity_expansion_depth., |
| 258 | max_entity_expansion_lengthrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Lexer#max_entity_expansion_length.: config.max_entity_expansion_lengthrust-analyzer cargo xml-rs 0.8.19 reader/config/ParserConfig2#max_entity_expansion_length., |
| 259 | } |
| 260 | } |
| 261 | |
| 262 | pub(craterust-analyzer cargo xml-rs 0.8.19 crate/) fn encodingrust-analyzer cargo xml-rs 0.8.19 reader/lexer/impl#[Lexer]encoding().(&mut self) -> Encodingrust-analyzer cargo xml-rs 0.8.19 util/Encoding# { |
| 263 | self.readerrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Lexer#reader..encodingrust-analyzer cargo xml-rs 0.8.19 util/CharReader#encoding. |
| 264 | } |
| 265 | |
| 266 | pub(craterust-analyzer cargo xml-rs 0.8.19 crate/) fn set_encodingrust-analyzer cargo xml-rs 0.8.19 reader/lexer/impl#[Lexer]set_encoding().(&mut self, encoding: Encodingrust-analyzer cargo xml-rs 0.8.19 util/Encoding#) { |
| 267 | self.readerrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Lexer#reader..encodingrust-analyzer cargo xml-rs 0.8.19 util/CharReader#encoding. = encoding; |
| 268 | } |
| 269 | |
| 270 | /// Disables error handling so `next_token` will return `Some(Chunk(..))` |
| 271 | /// upon invalid lexeme with this lexeme content. |
| 272 | #[cfg(test)] fn disable_errorsrust-analyzer cargo xml-rs 0.8.19 reader/lexer/impl#[Lexer]disable_errors().(&mut self) { self.skip_errorsrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Lexer#skip_errors. = true; } |
| 273 | |
| 274 | /// Reset the eof handled flag of the lexer. |
| 275 | #[inline] |
| 276 | pub fn reset_eof_handledrust-analyzer cargo xml-rs 0.8.19 reader/lexer/impl#[Lexer]reset_eof_handled().(&mut self) { self.eof_handledrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Lexer#eof_handled. = false; } |
| 277 | |
| 278 | /// Tries to read the next token from the buffer. |
| 279 | /// |
| 280 | /// It is possible to pass different instaces of `BufReader` each time |
| 281 | /// this method is called, but the resulting behavior is undefined in this case. |
| 282 | /// |
| 283 | /// Return value: |
| 284 | /// * `Err(reason) where reason: reader::Error` - when an error occurs; |
| 285 | /// * `Ok(None)` - upon end of stream is reached; |
| 286 | /// * `Ok(Some(token)) where token: Token` - in case a complete-token has been read from the stream. |
| 287 | pub fn next_tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/impl#[Lexer]next_token().<B: Readrust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/Read#>(&mut self, b: &mut B) -> Resultrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Result# { |
| 288 | // Already reached end of buffer |
| 289 | if self.eof_handledrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Lexer#eof_handled. { |
| 290 | return Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#); |
| 291 | } |
| 292 | |
| 293 | if !rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[bool][Not]not().self.inside_tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Lexer#inside_token. { |
| 294 | self.posrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Lexer#pos. = self.head_posrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Lexer#head_pos.; |
| 295 | self.inside_tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Lexer#inside_token. = true; |
| 296 | } |
| 297 | |
| 298 | // Check if we have saved a char or two for ourselves |
| 299 | while let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(c) = self.char_queuerust-analyzer cargo xml-rs 0.8.19 reader/lexer/Lexer#char_queue..pop_frontrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc collections/vec_deque/impl#[`VecDeque<T, A>`]pop_front().() { |
| 300 | match self.dispatch_charrust-analyzer cargo xml-rs 0.8.19 reader/lexer/impl#[Lexer]dispatch_char().(c)?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch(). { |
| 301 | Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(t) => { |
| 302 | self.inside_tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Lexer#inside_token. = false; |
| 303 | return Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(t)); |
| 304 | } |
| 305 | Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None# => {} // continue |
| 306 | } |
| 307 | } |
| 308 | // if char_queue is empty, all circular reparsing is done |
| 309 | self.reparse_depthrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Lexer#reparse_depth. = 0; |
| 310 | loop { |
| 311 | let c = match self.readerrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Lexer#reader..next_char_fromrust-analyzer cargo xml-rs 0.8.19 util/impl#[CharReader]next_char_from().(b)?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch(). { |
| 312 | Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(c) => c, // got next char |
| 313 | Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None# => break, // nothing to read left |
| 314 | }; |
| 315 | |
| 316 | if c rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[char][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[char][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[char][`PartialEq<Self>`]eq().'\n' { |
| 317 | self.head_posrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Lexer#head_pos..new_linerust-analyzer cargo xml-rs 0.8.19 common/impl#[TextPosition]new_line().(); |
| 318 | } else { |
| 319 | self.head_posrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Lexer#head_pos..advancerust-analyzer cargo xml-rs 0.8.19 common/impl#[TextPosition]advance().(1); |
| 320 | } |
| 321 | |
| 322 | match self.dispatch_charrust-analyzer cargo xml-rs 0.8.19 reader/lexer/impl#[Lexer]dispatch_char().(c)?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch(). { |
| 323 | Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(t) => { |
| 324 | self.inside_tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Lexer#inside_token. = false; |
| 325 | return Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(t)); |
| 326 | } |
| 327 | Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None# => { |
| 328 | // continue |
| 329 | } |
| 330 | } |
| 331 | } |
| 332 | |
| 333 | self.end_of_streamrust-analyzer cargo xml-rs 0.8.19 reader/lexer/impl#[Lexer]end_of_stream().() |
| 334 | } |
| 335 | |
| 336 | #[inline(never)] |
| 337 | fn end_of_streamrust-analyzer cargo xml-rs 0.8.19 reader/lexer/impl#[Lexer]end_of_stream().(&mut self) -> Resultrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Result# { |
| 338 | // Handle end of stream |
| 339 | self.eof_handledrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Lexer#eof_handled. = true; |
| 340 | self.posrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Lexer#pos. = self.head_posrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Lexer#head_pos.; |
| 341 | match self.strust-analyzer cargo xml-rs 0.8.19 reader/lexer/Lexer#st. { |
| 342 | Staterust-analyzer cargo xml-rs 0.8.19 reader/lexer/State#::InsideCdatarust-analyzer cargo xml-rs 0.8.19 reader/lexer/State#InsideCdata# | Staterust-analyzer cargo xml-rs 0.8.19 reader/lexer/State#::CDataClosingrust-analyzer cargo xml-rs 0.8.19 reader/lexer/State#CDataClosing#(_) => Errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Err#(self.errorrust-analyzer cargo xml-rs 0.8.19 reader/lexer/impl#[Lexer]error().(SyntaxErrorrust-analyzer cargo xml-rs 0.8.19 reader/error/SyntaxError#::UnclosedCdatarust-analyzer cargo xml-rs 0.8.19 reader/error/SyntaxError#UnclosedCdata#)), |
| 343 | Staterust-analyzer cargo xml-rs 0.8.19 reader/lexer/State#::TagStartedrust-analyzer cargo xml-rs 0.8.19 reader/lexer/State#TagStarted# | Staterust-analyzer cargo xml-rs 0.8.19 reader/lexer/State#::CommentOrCDataOrDoctypeStartedrust-analyzer cargo xml-rs 0.8.19 reader/lexer/State#CommentOrCDataOrDoctypeStarted# | |
| 344 | Staterust-analyzer cargo xml-rs 0.8.19 reader/lexer/State#::CommentStartedrust-analyzer cargo xml-rs 0.8.19 reader/lexer/State#CommentStarted# | Staterust-analyzer cargo xml-rs 0.8.19 reader/lexer/State#::CDataStartedrust-analyzer cargo xml-rs 0.8.19 reader/lexer/State#CDataStarted#(_)| Staterust-analyzer cargo xml-rs 0.8.19 reader/lexer/State#::DoctypeStartedrust-analyzer cargo xml-rs 0.8.19 reader/lexer/State#DoctypeStarted#(_) | |
| 345 | Staterust-analyzer cargo xml-rs 0.8.19 reader/lexer/State#::CommentClosingrust-analyzer cargo xml-rs 0.8.19 reader/lexer/State#CommentClosing#(ClosingSubstaterust-analyzer cargo xml-rs 0.8.19 reader/lexer/ClosingSubstate#::Secondrust-analyzer cargo xml-rs 0.8.19 reader/lexer/ClosingSubstate#Second#) | |
| 346 | Staterust-analyzer cargo xml-rs 0.8.19 reader/lexer/State#::InsideCommentrust-analyzer cargo xml-rs 0.8.19 reader/lexer/State#InsideComment# | Staterust-analyzer cargo xml-rs 0.8.19 reader/lexer/State#::InsideMarkupDeclarationrust-analyzer cargo xml-rs 0.8.19 reader/lexer/State#InsideMarkupDeclaration# | |
| 347 | Staterust-analyzer cargo xml-rs 0.8.19 reader/lexer/State#::InsideProcessingInstructionrust-analyzer cargo xml-rs 0.8.19 reader/lexer/State#InsideProcessingInstruction# | Staterust-analyzer cargo xml-rs 0.8.19 reader/lexer/State#::ProcessingInstructionClosingrust-analyzer cargo xml-rs 0.8.19 reader/lexer/State#ProcessingInstructionClosing# | |
| 348 | Staterust-analyzer cargo xml-rs 0.8.19 reader/lexer/State#::InsideDoctyperust-analyzer cargo xml-rs 0.8.19 reader/lexer/State#InsideDoctype# | Staterust-analyzer cargo xml-rs 0.8.19 reader/lexer/State#::InsideMarkupDeclarationQuotedStringrust-analyzer cargo xml-rs 0.8.19 reader/lexer/State#InsideMarkupDeclarationQuotedString#(_) => |
| 349 | Errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Err#(self.errorrust-analyzer cargo xml-rs 0.8.19 reader/lexer/impl#[Lexer]error().(SyntaxErrorrust-analyzer cargo xml-rs 0.8.19 reader/error/SyntaxError#::UnexpectedEofrust-analyzer cargo xml-rs 0.8.19 reader/error/SyntaxError#UnexpectedEof#)), |
| 350 | Staterust-analyzer cargo xml-rs 0.8.19 reader/lexer/State#::EmptyTagClosingrust-analyzer cargo xml-rs 0.8.19 reader/lexer/State#EmptyTagClosing# => |
| 351 | Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::Characterrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#Character#('/'))), |
| 352 | Staterust-analyzer cargo xml-rs 0.8.19 reader/lexer/State#::CommentClosingrust-analyzer cargo xml-rs 0.8.19 reader/lexer/State#CommentClosing#(ClosingSubstaterust-analyzer cargo xml-rs 0.8.19 reader/lexer/ClosingSubstate#::Firstrust-analyzer cargo xml-rs 0.8.19 reader/lexer/ClosingSubstate#First#) => |
| 353 | Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::Characterrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#Character#('-'))), |
| 354 | Staterust-analyzer cargo xml-rs 0.8.19 reader/lexer/State#::InvalidCDataClosingrust-analyzer cargo xml-rs 0.8.19 reader/lexer/State#InvalidCDataClosing#(ClosingSubstaterust-analyzer cargo xml-rs 0.8.19 reader/lexer/ClosingSubstate#::Firstrust-analyzer cargo xml-rs 0.8.19 reader/lexer/ClosingSubstate#First#) => |
| 355 | Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::Characterrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#Character#(']'))), |
| 356 | Staterust-analyzer cargo xml-rs 0.8.19 reader/lexer/State#::InvalidCDataClosingrust-analyzer cargo xml-rs 0.8.19 reader/lexer/State#InvalidCDataClosing#(ClosingSubstaterust-analyzer cargo xml-rs 0.8.19 reader/lexer/ClosingSubstate#::Secondrust-analyzer cargo xml-rs 0.8.19 reader/lexer/ClosingSubstate#Second#) => { |
| 357 | self.eof_handledrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Lexer#eof_handled. = false; |
| 358 | self.move_to_with_unreadrust-analyzer cargo xml-rs 0.8.19 reader/lexer/impl#[Lexer]move_to_with_unread().(Staterust-analyzer cargo xml-rs 0.8.19 reader/lexer/State#::Normalrust-analyzer cargo xml-rs 0.8.19 reader/lexer/State#Normal#, &[']'], Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::Characterrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#Character#(']')) |
| 359 | }, |
| 360 | Staterust-analyzer cargo xml-rs 0.8.19 reader/lexer/State#::Normalrust-analyzer cargo xml-rs 0.8.19 reader/lexer/State#Normal# => |
| 361 | Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#), |
| 362 | } |
| 363 | } |
| 364 | |
| 365 | #[cold] |
| 366 | fn errorrust-analyzer cargo xml-rs 0.8.19 reader/lexer/impl#[Lexer]error().(&self, e: SyntaxErrorrust-analyzer cargo xml-rs 0.8.19 reader/error/SyntaxError#) -> Errorrust-analyzer cargo xml-rs 0.8.19 reader/error/Error# { |
| 367 | Errorrust-analyzer cargo xml-rs 0.8.19 reader/error/Error# { |
| 368 | posrust-analyzer cargo xml-rs 0.8.19 reader/error/Error#pos.: self.positionrust-analyzer cargo xml-rs 0.8.19 reader/lexer/impl#[Lexer][Position]position().(), |
| 369 | kindrust-analyzer cargo xml-rs 0.8.19 reader/error/Error#kind.: ErrorKindrust-analyzer cargo xml-rs 0.8.19 reader/error/ErrorKind#::Syntaxrust-analyzer cargo xml-rs 0.8.19 reader/error/ErrorKind#Syntax#(e.to_cowrust-analyzer cargo xml-rs 0.8.19 reader/error/impl#[SyntaxError]to_cow().()), |
| 370 | } |
| 371 | } |
| 372 | |
| 373 | |
| 374 | #[inline(never)] |
| 375 | fn dispatch_charrust-analyzer cargo xml-rs 0.8.19 reader/lexer/impl#[Lexer]dispatch_char().(&mut self, c: char) -> Resultrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Result# { |
| 376 | match self.strust-analyzer cargo xml-rs 0.8.19 reader/lexer/Lexer#st. { |
| 377 | Staterust-analyzer cargo xml-rs 0.8.19 reader/lexer/State#::Normalrust-analyzer cargo xml-rs 0.8.19 reader/lexer/State#Normal# => self.normalrust-analyzer cargo xml-rs 0.8.19 reader/lexer/impl#[Lexer]normal().(c), |
| 378 | Staterust-analyzer cargo xml-rs 0.8.19 reader/lexer/State#::TagStartedrust-analyzer cargo xml-rs 0.8.19 reader/lexer/State#TagStarted# => self.tag_openedrust-analyzer cargo xml-rs 0.8.19 reader/lexer/impl#[Lexer]tag_opened().(c), |
| 379 | Staterust-analyzer cargo xml-rs 0.8.19 reader/lexer/State#::EmptyTagClosingrust-analyzer cargo xml-rs 0.8.19 reader/lexer/State#EmptyTagClosing# => self.empty_element_closingrust-analyzer cargo xml-rs 0.8.19 reader/lexer/impl#[Lexer]empty_element_closing().(c), |
| 380 | Staterust-analyzer cargo xml-rs 0.8.19 reader/lexer/State#::CommentOrCDataOrDoctypeStartedrust-analyzer cargo xml-rs 0.8.19 reader/lexer/State#CommentOrCDataOrDoctypeStarted# => self.comment_or_cdata_or_doctype_startedrust-analyzer cargo xml-rs 0.8.19 reader/lexer/impl#[Lexer]comment_or_cdata_or_doctype_started().(c), |
| 381 | Staterust-analyzer cargo xml-rs 0.8.19 reader/lexer/State#::InsideCdatarust-analyzer cargo xml-rs 0.8.19 reader/lexer/State#InsideCdata# => self.inside_cdatarust-analyzer cargo xml-rs 0.8.19 reader/lexer/impl#[Lexer]inside_cdata().(c), |
| 382 | Staterust-analyzer cargo xml-rs 0.8.19 reader/lexer/State#::CDataStartedrust-analyzer cargo xml-rs 0.8.19 reader/lexer/State#CDataStarted#(s) => self.cdata_startedrust-analyzer cargo xml-rs 0.8.19 reader/lexer/impl#[Lexer]cdata_started().(c, s), |
| 383 | Staterust-analyzer cargo xml-rs 0.8.19 reader/lexer/State#::InsideCommentrust-analyzer cargo xml-rs 0.8.19 reader/lexer/State#InsideComment# => self.inside_comment_staterust-analyzer cargo xml-rs 0.8.19 reader/lexer/impl#[Lexer]inside_comment_state().(c), |
| 384 | Staterust-analyzer cargo xml-rs 0.8.19 reader/lexer/State#::CommentStartedrust-analyzer cargo xml-rs 0.8.19 reader/lexer/State#CommentStarted# => self.comment_startedrust-analyzer cargo xml-rs 0.8.19 reader/lexer/impl#[Lexer]comment_started().(c), |
| 385 | Staterust-analyzer cargo xml-rs 0.8.19 reader/lexer/State#::InsideProcessingInstructionrust-analyzer cargo xml-rs 0.8.19 reader/lexer/State#InsideProcessingInstruction# => self.inside_processing_instructionrust-analyzer cargo xml-rs 0.8.19 reader/lexer/impl#[Lexer]inside_processing_instruction().(c), |
| 386 | Staterust-analyzer cargo xml-rs 0.8.19 reader/lexer/State#::ProcessingInstructionClosingrust-analyzer cargo xml-rs 0.8.19 reader/lexer/State#ProcessingInstructionClosing# => self.processing_instruction_closingrust-analyzer cargo xml-rs 0.8.19 reader/lexer/impl#[Lexer]processing_instruction_closing().(c), |
| 387 | Staterust-analyzer cargo xml-rs 0.8.19 reader/lexer/State#::CommentClosingrust-analyzer cargo xml-rs 0.8.19 reader/lexer/State#CommentClosing#(s) => self.comment_closingrust-analyzer cargo xml-rs 0.8.19 reader/lexer/impl#[Lexer]comment_closing().(c, s), |
| 388 | Staterust-analyzer cargo xml-rs 0.8.19 reader/lexer/State#::CDataClosingrust-analyzer cargo xml-rs 0.8.19 reader/lexer/State#CDataClosing#(s) => self.cdata_closingrust-analyzer cargo xml-rs 0.8.19 reader/lexer/impl#[Lexer]cdata_closing().(c, s), |
| 389 | Staterust-analyzer cargo xml-rs 0.8.19 reader/lexer/State#::InsideDoctyperust-analyzer cargo xml-rs 0.8.19 reader/lexer/State#InsideDoctype# => self.inside_doctyperust-analyzer cargo xml-rs 0.8.19 reader/lexer/impl#[Lexer]inside_doctype().(c), |
| 390 | Staterust-analyzer cargo xml-rs 0.8.19 reader/lexer/State#::DoctypeStartedrust-analyzer cargo xml-rs 0.8.19 reader/lexer/State#DoctypeStarted#(s) => self.doctype_startedrust-analyzer cargo xml-rs 0.8.19 reader/lexer/impl#[Lexer]doctype_started().(c, s), |
| 391 | Staterust-analyzer cargo xml-rs 0.8.19 reader/lexer/State#::InvalidCDataClosingrust-analyzer cargo xml-rs 0.8.19 reader/lexer/State#InvalidCDataClosing#(s) => self.invalid_cdata_closingrust-analyzer cargo xml-rs 0.8.19 reader/lexer/impl#[Lexer]invalid_cdata_closing().(c, s), |
| 392 | Staterust-analyzer cargo xml-rs 0.8.19 reader/lexer/State#::InsideMarkupDeclarationrust-analyzer cargo xml-rs 0.8.19 reader/lexer/State#InsideMarkupDeclaration# => self.markup_declarationrust-analyzer cargo xml-rs 0.8.19 reader/lexer/impl#[Lexer]markup_declaration().(c), |
| 393 | Staterust-analyzer cargo xml-rs 0.8.19 reader/lexer/State#::InsideMarkupDeclarationQuotedStringrust-analyzer cargo xml-rs 0.8.19 reader/lexer/State#InsideMarkupDeclarationQuotedString#(q) => self.markup_declaration_stringrust-analyzer cargo xml-rs 0.8.19 reader/lexer/impl#[Lexer]markup_declaration_string().(c, q), |
| 394 | } |
| 395 | } |
| 396 | |
| 397 | #[inline] |
| 398 | fn move_torust-analyzer cargo xml-rs 0.8.19 reader/lexer/impl#[Lexer]move_to().(&mut self, st: Staterust-analyzer cargo xml-rs 0.8.19 reader/lexer/State#) -> Resultrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Result# { |
| 399 | self.strust-analyzer cargo xml-rs 0.8.19 reader/lexer/Lexer#st. = st; |
| 400 | Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#) |
| 401 | } |
| 402 | |
| 403 | #[inline] |
| 404 | fn move_to_withrust-analyzer cargo xml-rs 0.8.19 reader/lexer/impl#[Lexer]move_to_with().(&mut self, st: Staterust-analyzer cargo xml-rs 0.8.19 reader/lexer/State#, token: Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#) -> Resultrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Result# { |
| 405 | self.strust-analyzer cargo xml-rs 0.8.19 reader/lexer/Lexer#st. = st; |
| 406 | Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(token)) |
| 407 | } |
| 408 | |
| 409 | #[inline] |
| 410 | fn move_to_and_reset_normalrust-analyzer cargo xml-rs 0.8.19 reader/lexer/impl#[Lexer]move_to_and_reset_normal().(&mut self, st: Staterust-analyzer cargo xml-rs 0.8.19 reader/lexer/State#, token: Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#) -> Resultrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Result# { |
| 411 | self.normal_staterust-analyzer cargo xml-rs 0.8.19 reader/lexer/Lexer#normal_state. = st; |
| 412 | self.strust-analyzer cargo xml-rs 0.8.19 reader/lexer/Lexer#st. = st; |
| 413 | Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(token)) |
| 414 | } |
| 415 | |
| 416 | fn move_to_with_unreadrust-analyzer cargo xml-rs 0.8.19 reader/lexer/impl#[Lexer]move_to_with_unread().(&mut self, st: Staterust-analyzer cargo xml-rs 0.8.19 reader/lexer/State#, cs: &[char], token: Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#) -> Resultrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Result# { |
| 417 | for c in cs.iterrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]iter().().revrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#rev().().copiedrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#copied().() { |
| 418 | self.char_queuerust-analyzer cargo xml-rs 0.8.19 reader/lexer/Lexer#char_queue..push_frontrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc collections/vec_deque/impl#[`VecDeque<T, A>`]push_front().(c); |
| 419 | } |
| 420 | self.move_to_withrust-analyzer cargo xml-rs 0.8.19 reader/lexer/impl#[Lexer]move_to_with().(st, token) |
| 421 | } |
| 422 | |
| 423 | pub(craterust-analyzer cargo xml-rs 0.8.19 crate/) fn reparserust-analyzer cargo xml-rs 0.8.19 reader/lexer/impl#[Lexer]reparse().(&mut self, markup: &str) -> Resultrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Result#<()> { |
| 424 | if markup.is_emptyrust-analyzer cargo core https://github.com/rust-lang/rust/library/core str/impl#[str]is_empty().() { |
| 425 | return Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(()); |
| 426 | } |
| 427 | |
| 428 | self.reparse_depthrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Lexer#reparse_depth. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u8][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u8][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u8][`AddAssign<Self>`]add_assign().1; |
| 429 | if self.reparse_depthrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Lexer#reparse_depth. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]gt().>rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]gt(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]gt().self.max_entity_expansion_depthrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Lexer#max_entity_expansion_depth. || self.char_queuerust-analyzer cargo xml-rs 0.8.19 reader/lexer/Lexer#char_queue..lenrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc collections/vec_deque/impl#[`VecDeque<T, A>`]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.max_entity_expansion_lengthrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Lexer#max_entity_expansion_length. { |
| 430 | return Errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Err#(self.errorrust-analyzer cargo xml-rs 0.8.19 reader/lexer/impl#[Lexer]error().(SyntaxErrorrust-analyzer cargo xml-rs 0.8.19 reader/error/SyntaxError#::EntityTooBigrust-analyzer cargo xml-rs 0.8.19 reader/error/SyntaxError#EntityTooBig#)) |
| 431 | } |
| 432 | |
| 433 | self.eof_handledrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Lexer#eof_handled. = false; |
| 434 | self.char_queuerust-analyzer cargo xml-rs 0.8.19 reader/lexer/Lexer#char_queue..reserverust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc collections/vec_deque/impl#[`VecDeque<T, A>`]reserve().(markup.lenrust-analyzer cargo core https://github.com/rust-lang/rust/library/core str/impl#[str]len().()); |
| 435 | for c in markup.charsrust-analyzer cargo core https://github.com/rust-lang/rust/library/core str/impl#[str]chars().().revrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#rev().() { |
| 436 | self.char_queuerust-analyzer cargo xml-rs 0.8.19 reader/lexer/Lexer#char_queue..push_frontrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc collections/vec_deque/impl#[`VecDeque<T, A>`]push_front().(c); |
| 437 | } |
| 438 | |
| 439 | Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(()) |
| 440 | } |
| 441 | |
| 442 | fn handle_errorrust-analyzer cargo xml-rs 0.8.19 reader/lexer/impl#[Lexer]handle_error().(&mut self, chunk: &'static str, c: char) -> Resultrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Result# { |
| 443 | debug_assertrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/debug_assert!!(!rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[bool][Not]not().chunk.is_emptyrust-analyzer cargo core https://github.com/rust-lang/rust/library/core str/impl#[str]is_empty().()); |
| 444 | |
| 445 | #[cfg(test)] |
| 446 | if self.skip_errorsrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Lexer#skip_errors. { |
| 447 | let mut chars = chunk.charsrust-analyzer cargo core https://github.com/rust-lang/rust/library/core str/impl#[str]chars().(); |
| 448 | let first = chars.nextrust-analyzer cargo core https://github.com/rust-lang/rust/library/core str/iter/impl#[`Chars<'a>`][Iterator]next().().unwrap_orrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]unwrap_or().('\0'); |
| 449 | self.char_queuerust-analyzer cargo xml-rs 0.8.19 reader/lexer/Lexer#char_queue..extendrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc collections/vec_deque/impl#[`VecDeque<T, A>`][`Extend<T>`]extend().(chars); |
| 450 | self.char_queuerust-analyzer cargo xml-rs 0.8.19 reader/lexer/Lexer#char_queue..push_backrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc collections/vec_deque/impl#[`VecDeque<T, A>`]push_back().(c); |
| 451 | return self.move_to_withrust-analyzer cargo xml-rs 0.8.19 reader/lexer/impl#[Lexer]move_to_with().(Staterust-analyzer cargo xml-rs 0.8.19 reader/lexer/State#::Normalrust-analyzer cargo xml-rs 0.8.19 reader/lexer/State#Normal#, Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::Characterrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#Character#(first)); |
| 452 | } |
| 453 | Errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Err#(self.errorrust-analyzer cargo xml-rs 0.8.19 reader/lexer/impl#[Lexer]error().(SyntaxErrorrust-analyzer cargo xml-rs 0.8.19 reader/error/SyntaxError#::UnexpectedTokenBeforerust-analyzer cargo xml-rs 0.8.19 reader/error/SyntaxError#UnexpectedTokenBefore#(chunk, c))) |
| 454 | } |
| 455 | |
| 456 | /// Encountered a char |
| 457 | fn normalrust-analyzer cargo xml-rs 0.8.19 reader/lexer/impl#[Lexer]normal().(&mut self, c: char) -> Resultrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Result# { |
| 458 | match c { |
| 459 | '<' => self.move_torust-analyzer cargo xml-rs 0.8.19 reader/lexer/impl#[Lexer]move_to().(Staterust-analyzer cargo xml-rs 0.8.19 reader/lexer/State#::TagStartedrust-analyzer cargo xml-rs 0.8.19 reader/lexer/State#TagStarted#), |
| 460 | '>' => Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::TagEndrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#TagEnd#)), |
| 461 | '/' => self.move_torust-analyzer cargo xml-rs 0.8.19 reader/lexer/impl#[Lexer]move_to().(Staterust-analyzer cargo xml-rs 0.8.19 reader/lexer/State#::EmptyTagClosingrust-analyzer cargo xml-rs 0.8.19 reader/lexer/State#EmptyTagClosing#), |
| 462 | '=' => Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::EqualsSignrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#EqualsSign#)), |
| 463 | '"' => Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::DoubleQuoterust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#DoubleQuote#)), |
| 464 | '\'' => Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::SingleQuoterust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#SingleQuote#)), |
| 465 | ']' => self.move_torust-analyzer cargo xml-rs 0.8.19 reader/lexer/impl#[Lexer]move_to().(Staterust-analyzer cargo xml-rs 0.8.19 reader/lexer/State#::InvalidCDataClosingrust-analyzer cargo xml-rs 0.8.19 reader/lexer/State#InvalidCDataClosing#(ClosingSubstaterust-analyzer cargo xml-rs 0.8.19 reader/lexer/ClosingSubstate#::Firstrust-analyzer cargo xml-rs 0.8.19 reader/lexer/ClosingSubstate#First#)), |
| 466 | '&' => Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::ReferenceStartrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#ReferenceStart#)), |
| 467 | ';' => Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::ReferenceEndrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#ReferenceEnd#)), |
| 468 | _ => Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::Characterrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#Character#(c))) |
| 469 | } |
| 470 | } |
| 471 | |
| 472 | fn inside_cdatarust-analyzer cargo xml-rs 0.8.19 reader/lexer/impl#[Lexer]inside_cdata().(&mut self, c: char) -> Resultrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Result# { |
| 473 | match c { |
| 474 | ']' => self.move_torust-analyzer cargo xml-rs 0.8.19 reader/lexer/impl#[Lexer]move_to().(Staterust-analyzer cargo xml-rs 0.8.19 reader/lexer/State#::CDataClosingrust-analyzer cargo xml-rs 0.8.19 reader/lexer/State#CDataClosing#(ClosingSubstaterust-analyzer cargo xml-rs 0.8.19 reader/lexer/ClosingSubstate#::Firstrust-analyzer cargo xml-rs 0.8.19 reader/lexer/ClosingSubstate#First#)), |
| 475 | _ => Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::Characterrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#Character#(c))) |
| 476 | } |
| 477 | } |
| 478 | |
| 479 | fn inside_processing_instructionrust-analyzer cargo xml-rs 0.8.19 reader/lexer/impl#[Lexer]inside_processing_instruction().(&mut self, c: char) -> Resultrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Result# { |
| 480 | // These tokens are used by `<?xml?>` parser |
| 481 | match c { |
| 482 | '?' => self.move_torust-analyzer cargo xml-rs 0.8.19 reader/lexer/impl#[Lexer]move_to().(Staterust-analyzer cargo xml-rs 0.8.19 reader/lexer/State#::ProcessingInstructionClosingrust-analyzer cargo xml-rs 0.8.19 reader/lexer/State#ProcessingInstructionClosing#), |
| 483 | '<' => Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::OpeningTagStartrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#OpeningTagStart#)), |
| 484 | '>' => Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::TagEndrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#TagEnd#)), |
| 485 | '/' => Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::ClosingTagStartrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#ClosingTagStart#)), |
| 486 | '=' => Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::EqualsSignrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#EqualsSign#)), |
| 487 | '"' => Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::DoubleQuoterust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#DoubleQuote#)), |
| 488 | '\'' => Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::SingleQuoterust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#SingleQuote#)), |
| 489 | '&' => Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::ReferenceStartrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#ReferenceStart#)), |
| 490 | ';' => Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::ReferenceEndrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#ReferenceEnd#)), |
| 491 | _ => Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::Characterrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#Character#(c))) |
| 492 | } |
| 493 | } |
| 494 | |
| 495 | fn inside_comment_staterust-analyzer cargo xml-rs 0.8.19 reader/lexer/impl#[Lexer]inside_comment_state().(&mut self, c: char) -> Resultrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Result# { |
| 496 | match c { |
| 497 | '-' => self.move_torust-analyzer cargo xml-rs 0.8.19 reader/lexer/impl#[Lexer]move_to().(Staterust-analyzer cargo xml-rs 0.8.19 reader/lexer/State#::CommentClosingrust-analyzer cargo xml-rs 0.8.19 reader/lexer/State#CommentClosing#(ClosingSubstaterust-analyzer cargo xml-rs 0.8.19 reader/lexer/ClosingSubstate#::Firstrust-analyzer cargo xml-rs 0.8.19 reader/lexer/ClosingSubstate#First#)), |
| 498 | _ => Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::Characterrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#Character#(c))) |
| 499 | } |
| 500 | } |
| 501 | |
| 502 | /// Encountered '<' |
| 503 | fn tag_openedrust-analyzer cargo xml-rs 0.8.19 reader/lexer/impl#[Lexer]tag_opened().(&mut self, c: char) -> Resultrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Result# { |
| 504 | match c { |
| 505 | '?' => self.move_to_withrust-analyzer cargo xml-rs 0.8.19 reader/lexer/impl#[Lexer]move_to_with().(Staterust-analyzer cargo xml-rs 0.8.19 reader/lexer/State#::InsideProcessingInstructionrust-analyzer cargo xml-rs 0.8.19 reader/lexer/State#InsideProcessingInstruction#, Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::ProcessingInstructionStartrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#ProcessingInstructionStart#), |
| 506 | '/' => self.move_to_withrust-analyzer cargo xml-rs 0.8.19 reader/lexer/impl#[Lexer]move_to_with().(self.normal_staterust-analyzer cargo xml-rs 0.8.19 reader/lexer/Lexer#normal_state., Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::ClosingTagStartrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#ClosingTagStart#), |
| 507 | '!' => self.move_torust-analyzer cargo xml-rs 0.8.19 reader/lexer/impl#[Lexer]move_to().(Staterust-analyzer cargo xml-rs 0.8.19 reader/lexer/State#::CommentOrCDataOrDoctypeStartedrust-analyzer cargo xml-rs 0.8.19 reader/lexer/State#CommentOrCDataOrDoctypeStarted#), |
| 508 | _ if is_whitespace_charrust-analyzer cargo xml-rs 0.8.19 common/is_whitespace_char().(c) => self.move_to_with_unreadrust-analyzer cargo xml-rs 0.8.19 reader/lexer/impl#[Lexer]move_to_with_unread().(self.normal_staterust-analyzer cargo xml-rs 0.8.19 reader/lexer/Lexer#normal_state., &[c], Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::OpeningTagStartrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#OpeningTagStart#), |
| 509 | _ if is_name_charrust-analyzer cargo xml-rs 0.8.19 common/is_name_char().(c) => self.move_to_with_unreadrust-analyzer cargo xml-rs 0.8.19 reader/lexer/impl#[Lexer]move_to_with_unread().(self.normal_staterust-analyzer cargo xml-rs 0.8.19 reader/lexer/Lexer#normal_state., &[c], Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::OpeningTagStartrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#OpeningTagStart#), |
| 510 | _ => self.handle_errorrust-analyzer cargo xml-rs 0.8.19 reader/lexer/impl#[Lexer]handle_error().("<", c) |
| 511 | } |
| 512 | } |
| 513 | |
| 514 | /// Encountered '<!' |
| 515 | fn comment_or_cdata_or_doctype_startedrust-analyzer cargo xml-rs 0.8.19 reader/lexer/impl#[Lexer]comment_or_cdata_or_doctype_started().(&mut self, c: char) -> Resultrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Result# { |
| 516 | match c { |
| 517 | '-' => self.move_torust-analyzer cargo xml-rs 0.8.19 reader/lexer/impl#[Lexer]move_to().(Staterust-analyzer cargo xml-rs 0.8.19 reader/lexer/State#::CommentStartedrust-analyzer cargo xml-rs 0.8.19 reader/lexer/State#CommentStarted#), |
| 518 | '[' => self.move_torust-analyzer cargo xml-rs 0.8.19 reader/lexer/impl#[Lexer]move_to().(Staterust-analyzer cargo xml-rs 0.8.19 reader/lexer/State#::CDataStartedrust-analyzer cargo xml-rs 0.8.19 reader/lexer/State#CDataStarted#(CDataStartedSubstaterust-analyzer cargo xml-rs 0.8.19 reader/lexer/CDataStartedSubstate#::Erust-analyzer cargo xml-rs 0.8.19 reader/lexer/CDataStartedSubstate#E#)), |
| 519 | 'D' => self.move_torust-analyzer cargo xml-rs 0.8.19 reader/lexer/impl#[Lexer]move_to().(Staterust-analyzer cargo xml-rs 0.8.19 reader/lexer/State#::DoctypeStartedrust-analyzer cargo xml-rs 0.8.19 reader/lexer/State#DoctypeStarted#(DoctypeStartedSubstaterust-analyzer cargo xml-rs 0.8.19 reader/lexer/DoctypeStartedSubstate#::Drust-analyzer cargo xml-rs 0.8.19 reader/lexer/DoctypeStartedSubstate#D#)), |
| 520 | 'E' | 'A' | 'N' if matchesrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/matches!!(self.normal_staterust-analyzer cargo xml-rs 0.8.19 reader/lexer/Lexer#normal_state., Staterust-analyzer cargo xml-rs 0.8.19 reader/lexer/State#::InsideDoctyperust-analyzer cargo xml-rs 0.8.19 reader/lexer/State#InsideDoctype#) => { |
| 521 | self.move_to_with_unreadrust-analyzer cargo xml-rs 0.8.19 reader/lexer/impl#[Lexer]move_to_with_unread().(Staterust-analyzer cargo xml-rs 0.8.19 reader/lexer/State#::InsideMarkupDeclarationrust-analyzer cargo xml-rs 0.8.19 reader/lexer/State#InsideMarkupDeclaration#, &[c], Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::MarkupDeclarationStartrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#MarkupDeclarationStart#) |
| 522 | }, |
| 523 | _ => self.handle_errorrust-analyzer cargo xml-rs 0.8.19 reader/lexer/impl#[Lexer]handle_error().("<!", c), |
| 524 | } |
| 525 | } |
| 526 | |
| 527 | /// Encountered '<!-' |
| 528 | fn comment_startedrust-analyzer cargo xml-rs 0.8.19 reader/lexer/impl#[Lexer]comment_started().(&mut self, c: char) -> Resultrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Result# { |
| 529 | match c { |
| 530 | '-' => self.move_to_withrust-analyzer cargo xml-rs 0.8.19 reader/lexer/impl#[Lexer]move_to_with().(Staterust-analyzer cargo xml-rs 0.8.19 reader/lexer/State#::InsideCommentrust-analyzer cargo xml-rs 0.8.19 reader/lexer/State#InsideComment#, Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::CommentStartrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#CommentStart#), |
| 531 | _ => self.handle_errorrust-analyzer cargo xml-rs 0.8.19 reader/lexer/impl#[Lexer]handle_error().("<!-", c), |
| 532 | } |
| 533 | } |
| 534 | |
| 535 | /// Encountered '<![' |
| 536 | fn cdata_startedrust-analyzer cargo xml-rs 0.8.19 reader/lexer/impl#[Lexer]cdata_started().(&mut self, c: char, s: CDataStartedSubstaterust-analyzer cargo xml-rs 0.8.19 reader/lexer/CDataStartedSubstate#) -> Resultrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Result# { |
| 537 | use selfrust-analyzer cargo xml-rs 0.8.19 reader/lexer/::CDataStartedSubstaterust-analyzer cargo xml-rs 0.8.19 reader/lexer/CDataStartedSubstate#::{Crust-analyzer cargo xml-rs 0.8.19 reader/lexer/CDataStartedSubstate#C#, CDrust-analyzer cargo xml-rs 0.8.19 reader/lexer/CDataStartedSubstate#CD#, CDArust-analyzer cargo xml-rs 0.8.19 reader/lexer/CDataStartedSubstate#CDA#, CDATrust-analyzer cargo xml-rs 0.8.19 reader/lexer/CDataStartedSubstate#CDAT#, CDATArust-analyzer cargo xml-rs 0.8.19 reader/lexer/CDataStartedSubstate#CDATA#, Erust-analyzer cargo xml-rs 0.8.19 reader/lexer/CDataStartedSubstate#E#}; |
| 538 | dispatch_on_enum_staterust-analyzer cargo xml-rs 0.8.19 reader/lexer/dispatch_on_enum_state!!(self, s, c, Staterust-analyzer cargo xml-rs 0.8.19 reader/lexer/State#::CDataStartedrust-analyzer cargo xml-rs 0.8.19 reader/lexer/State#CDataStarted#, |
| 539 | Erust-analyzer cargo xml-rs 0.8.19 reader/lexer/CDataStartedSubstate#E# ; 'C' ; Crust-analyzer cargo xml-rs 0.8.19 reader/lexer/CDataStartedSubstate#C# ; "<![", |
| 540 | Crust-analyzer cargo xml-rs 0.8.19 reader/lexer/CDataStartedSubstate#C# ; 'D' ; CDrust-analyzer cargo xml-rs 0.8.19 reader/lexer/CDataStartedSubstate#CD# ; "<![C", |
| 541 | CDrust-analyzer cargo xml-rs 0.8.19 reader/lexer/CDataStartedSubstate#CD# ; 'A' ; CDArust-analyzer cargo xml-rs 0.8.19 reader/lexer/CDataStartedSubstate#CDA# ; "<![CD", |
| 542 | CDArust-analyzer cargo xml-rs 0.8.19 reader/lexer/CDataStartedSubstate#CDA# ; 'T' ; CDATrust-analyzer cargo xml-rs 0.8.19 reader/lexer/CDataStartedSubstate#CDAT# ; "<![CDA", |
| 543 | CDATrust-analyzer cargo xml-rs 0.8.19 reader/lexer/CDataStartedSubstate#CDAT# ; 'A' ; CDATArust-analyzer cargo xml-rs 0.8.19 reader/lexer/CDataStartedSubstate#CDATA# ; "<![CDAT"; |
| 544 | CDATArust-analyzer cargo xml-rs 0.8.19 reader/lexer/CDataStartedSubstate#CDATA# ; '[' ; "<![CDATA" ; self.move_to_withrust-analyzer cargo xml-rs 0.8.19 reader/lexer/impl#[Lexer]move_to_with().(Staterust-analyzer cargo xml-rs 0.8.19 reader/lexer/State#::InsideCdatarust-analyzer cargo xml-rs 0.8.19 reader/lexer/State#InsideCdata#, Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::CDataStartrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#CDataStart#) |
| 545 | ) |
| 546 | } |
| 547 | |
| 548 | /// Encountered '<!…' that isn't DOCTYPE or CDATA |
| 549 | fn markup_declarationrust-analyzer cargo xml-rs 0.8.19 reader/lexer/impl#[Lexer]markup_declaration().(&mut self, c: char) -> Resultrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Result# { |
| 550 | match c { |
| 551 | '<' => self.handle_errorrust-analyzer cargo xml-rs 0.8.19 reader/lexer/impl#[Lexer]handle_error().("<!", c), |
| 552 | '>' => self.move_to_withrust-analyzer cargo xml-rs 0.8.19 reader/lexer/impl#[Lexer]move_to_with().(self.normal_staterust-analyzer cargo xml-rs 0.8.19 reader/lexer/Lexer#normal_state., Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::TagEndrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#TagEnd#), |
| 553 | '&' => Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::ReferenceStartrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#ReferenceStart#)), |
| 554 | ';' => Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::ReferenceEndrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#ReferenceEnd#)), |
| 555 | '"' => self.move_to_withrust-analyzer cargo xml-rs 0.8.19 reader/lexer/impl#[Lexer]move_to_with().(Staterust-analyzer cargo xml-rs 0.8.19 reader/lexer/State#::InsideMarkupDeclarationQuotedStringrust-analyzer cargo xml-rs 0.8.19 reader/lexer/State#InsideMarkupDeclarationQuotedString#(QuoteStylerust-analyzer cargo xml-rs 0.8.19 reader/lexer/QuoteStyle#::Doublerust-analyzer cargo xml-rs 0.8.19 reader/lexer/QuoteStyle#Double#), Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::DoubleQuoterust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#DoubleQuote#), |
| 556 | '\'' => self.move_to_withrust-analyzer cargo xml-rs 0.8.19 reader/lexer/impl#[Lexer]move_to_with().(Staterust-analyzer cargo xml-rs 0.8.19 reader/lexer/State#::InsideMarkupDeclarationQuotedStringrust-analyzer cargo xml-rs 0.8.19 reader/lexer/State#InsideMarkupDeclarationQuotedString#(QuoteStylerust-analyzer cargo xml-rs 0.8.19 reader/lexer/QuoteStyle#::Singlerust-analyzer cargo xml-rs 0.8.19 reader/lexer/QuoteStyle#Single#), Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::SingleQuoterust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#SingleQuote#), |
| 557 | _ => Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::Characterrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#Character#(c))), |
| 558 | } |
| 559 | } |
| 560 | |
| 561 | fn markup_declaration_stringrust-analyzer cargo xml-rs 0.8.19 reader/lexer/impl#[Lexer]markup_declaration_string().(&mut self, c: char, q: QuoteStylerust-analyzer cargo xml-rs 0.8.19 reader/lexer/QuoteStyle#) -> Resultrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Result# { |
| 562 | match c { |
| 563 | '"' if q rust-analyzer cargo xml-rs 0.8.19 reader/lexer/impl#[QuoteStyle][`PartialEq<Self>`]eq().==rust-analyzer cargo xml-rs 0.8.19 reader/lexer/impl#[QuoteStyle][`PartialEq<Self>`]eq(). rust-analyzer cargo xml-rs 0.8.19 reader/lexer/impl#[QuoteStyle][`PartialEq<Self>`]eq().QuoteStylerust-analyzer cargo xml-rs 0.8.19 reader/lexer/QuoteStyle#::Doublerust-analyzer cargo xml-rs 0.8.19 reader/lexer/QuoteStyle#Double# => self.move_to_withrust-analyzer cargo xml-rs 0.8.19 reader/lexer/impl#[Lexer]move_to_with().(Staterust-analyzer cargo xml-rs 0.8.19 reader/lexer/State#::InsideMarkupDeclarationrust-analyzer cargo xml-rs 0.8.19 reader/lexer/State#InsideMarkupDeclaration#, Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::DoubleQuoterust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#DoubleQuote#), |
| 564 | '\'' if q rust-analyzer cargo xml-rs 0.8.19 reader/lexer/impl#[QuoteStyle][`PartialEq<Self>`]eq().==rust-analyzer cargo xml-rs 0.8.19 reader/lexer/impl#[QuoteStyle][`PartialEq<Self>`]eq(). rust-analyzer cargo xml-rs 0.8.19 reader/lexer/impl#[QuoteStyle][`PartialEq<Self>`]eq().QuoteStylerust-analyzer cargo xml-rs 0.8.19 reader/lexer/QuoteStyle#::Singlerust-analyzer cargo xml-rs 0.8.19 reader/lexer/QuoteStyle#Single# => self.move_to_withrust-analyzer cargo xml-rs 0.8.19 reader/lexer/impl#[Lexer]move_to_with().(Staterust-analyzer cargo xml-rs 0.8.19 reader/lexer/State#::InsideMarkupDeclarationrust-analyzer cargo xml-rs 0.8.19 reader/lexer/State#InsideMarkupDeclaration#, Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::SingleQuoterust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#SingleQuote#), |
| 565 | _ => Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::Characterrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#Character#(c))), |
| 566 | } |
| 567 | } |
| 568 | |
| 569 | /// Encountered '<!D' |
| 570 | fn doctype_startedrust-analyzer cargo xml-rs 0.8.19 reader/lexer/impl#[Lexer]doctype_started().(&mut self, c: char, s: DoctypeStartedSubstaterust-analyzer cargo xml-rs 0.8.19 reader/lexer/DoctypeStartedSubstate#) -> Resultrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Result# { |
| 571 | use selfrust-analyzer cargo xml-rs 0.8.19 reader/lexer/::DoctypeStartedSubstaterust-analyzer cargo xml-rs 0.8.19 reader/lexer/DoctypeStartedSubstate#::{Drust-analyzer cargo xml-rs 0.8.19 reader/lexer/DoctypeStartedSubstate#D#, DOrust-analyzer cargo xml-rs 0.8.19 reader/lexer/DoctypeStartedSubstate#DO#, DOCrust-analyzer cargo xml-rs 0.8.19 reader/lexer/DoctypeStartedSubstate#DOC#, DOCTrust-analyzer cargo xml-rs 0.8.19 reader/lexer/DoctypeStartedSubstate#DOCT#, DOCTYrust-analyzer cargo xml-rs 0.8.19 reader/lexer/DoctypeStartedSubstate#DOCTY#, DOCTYPrust-analyzer cargo xml-rs 0.8.19 reader/lexer/DoctypeStartedSubstate#DOCTYP#}; |
| 572 | dispatch_on_enum_staterust-analyzer cargo xml-rs 0.8.19 reader/lexer/dispatch_on_enum_state!!(self, s, c, Staterust-analyzer cargo xml-rs 0.8.19 reader/lexer/State#::DoctypeStartedrust-analyzer cargo xml-rs 0.8.19 reader/lexer/State#DoctypeStarted#, |
| 573 | Drust-analyzer cargo xml-rs 0.8.19 reader/lexer/DoctypeStartedSubstate#D# ; 'O' ; DOrust-analyzer cargo xml-rs 0.8.19 reader/lexer/DoctypeStartedSubstate#DO# ; "<!D", |
| 574 | DOrust-analyzer cargo xml-rs 0.8.19 reader/lexer/DoctypeStartedSubstate#DO# ; 'C' ; DOCrust-analyzer cargo xml-rs 0.8.19 reader/lexer/DoctypeStartedSubstate#DOC# ; "<!DO", |
| 575 | DOCrust-analyzer cargo xml-rs 0.8.19 reader/lexer/DoctypeStartedSubstate#DOC# ; 'T' ; DOCTrust-analyzer cargo xml-rs 0.8.19 reader/lexer/DoctypeStartedSubstate#DOCT# ; "<!DOC", |
| 576 | DOCTrust-analyzer cargo xml-rs 0.8.19 reader/lexer/DoctypeStartedSubstate#DOCT# ; 'Y' ; DOCTYrust-analyzer cargo xml-rs 0.8.19 reader/lexer/DoctypeStartedSubstate#DOCTY# ; "<!DOCT", |
| 577 | DOCTYrust-analyzer cargo xml-rs 0.8.19 reader/lexer/DoctypeStartedSubstate#DOCTY# ; 'P' ; DOCTYPrust-analyzer cargo xml-rs 0.8.19 reader/lexer/DoctypeStartedSubstate#DOCTYP# ; "<!DOCTY"; |
| 578 | DOCTYPrust-analyzer cargo xml-rs 0.8.19 reader/lexer/DoctypeStartedSubstate#DOCTYP# ; 'E' ; "<!DOCTYP" ; self.move_to_and_reset_normalrust-analyzer cargo xml-rs 0.8.19 reader/lexer/impl#[Lexer]move_to_and_reset_normal().(Staterust-analyzer cargo xml-rs 0.8.19 reader/lexer/State#::InsideDoctyperust-analyzer cargo xml-rs 0.8.19 reader/lexer/State#InsideDoctype#, Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::DoctypeStartrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#DoctypeStart#) |
| 579 | ) |
| 580 | } |
| 581 | |
| 582 | /// State used while awaiting the closing bracket for the <!DOCTYPE tag |
| 583 | fn inside_doctyperust-analyzer cargo xml-rs 0.8.19 reader/lexer/impl#[Lexer]inside_doctype().(&mut self, c: char) -> Resultrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Result# { |
| 584 | match c { |
| 585 | '>' => self.move_to_and_reset_normalrust-analyzer cargo xml-rs 0.8.19 reader/lexer/impl#[Lexer]move_to_and_reset_normal().(Staterust-analyzer cargo xml-rs 0.8.19 reader/lexer/State#::Normalrust-analyzer cargo xml-rs 0.8.19 reader/lexer/State#Normal#, Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::TagEndrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#TagEnd#), |
| 586 | '<' => self.move_torust-analyzer cargo xml-rs 0.8.19 reader/lexer/impl#[Lexer]move_to().(Staterust-analyzer cargo xml-rs 0.8.19 reader/lexer/State#::TagStartedrust-analyzer cargo xml-rs 0.8.19 reader/lexer/State#TagStarted#), |
| 587 | '&' => Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::ReferenceStartrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#ReferenceStart#)), |
| 588 | ';' => Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::ReferenceEndrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#ReferenceEnd#)), |
| 589 | '"' => Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::DoubleQuoterust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#DoubleQuote#)), |
| 590 | '\'' => Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::SingleQuoterust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#SingleQuote#)), |
| 591 | _ => Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::Characterrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#Character#(c))), |
| 592 | } |
| 593 | } |
| 594 | |
| 595 | /// Encountered '?' |
| 596 | fn processing_instruction_closingrust-analyzer cargo xml-rs 0.8.19 reader/lexer/impl#[Lexer]processing_instruction_closing().(&mut self, c: char) -> Resultrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Result# { |
| 597 | match c { |
| 598 | '>' => self.move_to_withrust-analyzer cargo xml-rs 0.8.19 reader/lexer/impl#[Lexer]move_to_with().(self.normal_staterust-analyzer cargo xml-rs 0.8.19 reader/lexer/Lexer#normal_state., Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::ProcessingInstructionEndrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#ProcessingInstructionEnd#), |
| 599 | _ => self.move_to_with_unreadrust-analyzer cargo xml-rs 0.8.19 reader/lexer/impl#[Lexer]move_to_with_unread().(Staterust-analyzer cargo xml-rs 0.8.19 reader/lexer/State#::InsideProcessingInstructionrust-analyzer cargo xml-rs 0.8.19 reader/lexer/State#InsideProcessingInstruction#, &[c], Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::Characterrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#Character#('?')), |
| 600 | } |
| 601 | } |
| 602 | |
| 603 | /// Encountered '/' |
| 604 | fn empty_element_closingrust-analyzer cargo xml-rs 0.8.19 reader/lexer/impl#[Lexer]empty_element_closing().(&mut self, c: char) -> Resultrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Result# { |
| 605 | match c { |
| 606 | '>' => self.move_to_withrust-analyzer cargo xml-rs 0.8.19 reader/lexer/impl#[Lexer]move_to_with().(self.normal_staterust-analyzer cargo xml-rs 0.8.19 reader/lexer/Lexer#normal_state., Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::EmptyTagEndrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#EmptyTagEnd#), |
| 607 | _ => self.move_to_with_unreadrust-analyzer cargo xml-rs 0.8.19 reader/lexer/impl#[Lexer]move_to_with_unread().(self.normal_staterust-analyzer cargo xml-rs 0.8.19 reader/lexer/Lexer#normal_state., &[c], Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::Characterrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#Character#('/')), |
| 608 | } |
| 609 | } |
| 610 | |
| 611 | /// Encountered '-' |
| 612 | fn comment_closingrust-analyzer cargo xml-rs 0.8.19 reader/lexer/impl#[Lexer]comment_closing().(&mut self, c: char, s: ClosingSubstaterust-analyzer cargo xml-rs 0.8.19 reader/lexer/ClosingSubstate#) -> Resultrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Result# { |
| 613 | match s { |
| 614 | ClosingSubstaterust-analyzer cargo xml-rs 0.8.19 reader/lexer/ClosingSubstate#::Firstrust-analyzer cargo xml-rs 0.8.19 reader/lexer/ClosingSubstate#First# => match c { |
| 615 | '-' => self.move_torust-analyzer cargo xml-rs 0.8.19 reader/lexer/impl#[Lexer]move_to().(Staterust-analyzer cargo xml-rs 0.8.19 reader/lexer/State#::CommentClosingrust-analyzer cargo xml-rs 0.8.19 reader/lexer/State#CommentClosing#(ClosingSubstaterust-analyzer cargo xml-rs 0.8.19 reader/lexer/ClosingSubstate#::Secondrust-analyzer cargo xml-rs 0.8.19 reader/lexer/ClosingSubstate#Second#)), |
| 616 | _ => self.move_to_with_unreadrust-analyzer cargo xml-rs 0.8.19 reader/lexer/impl#[Lexer]move_to_with_unread().(Staterust-analyzer cargo xml-rs 0.8.19 reader/lexer/State#::InsideCommentrust-analyzer cargo xml-rs 0.8.19 reader/lexer/State#InsideComment#, &[c], Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::Characterrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#Character#('-')), |
| 617 | }, |
| 618 | ClosingSubstaterust-analyzer cargo xml-rs 0.8.19 reader/lexer/ClosingSubstate#::Secondrust-analyzer cargo xml-rs 0.8.19 reader/lexer/ClosingSubstate#Second# => match c { |
| 619 | '>' => self.move_to_withrust-analyzer cargo xml-rs 0.8.19 reader/lexer/impl#[Lexer]move_to_with().(self.normal_staterust-analyzer cargo xml-rs 0.8.19 reader/lexer/Lexer#normal_state., Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::CommentEndrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#CommentEnd#), |
| 620 | // double dash not followed by a greater-than is a hard error inside comment |
| 621 | _ => self.handle_errorrust-analyzer cargo xml-rs 0.8.19 reader/lexer/impl#[Lexer]handle_error().("--", c), |
| 622 | }, |
| 623 | } |
| 624 | } |
| 625 | |
| 626 | /// Encountered ']' |
| 627 | fn cdata_closingrust-analyzer cargo xml-rs 0.8.19 reader/lexer/impl#[Lexer]cdata_closing().(&mut self, c: char, s: ClosingSubstaterust-analyzer cargo xml-rs 0.8.19 reader/lexer/ClosingSubstate#) -> Resultrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Result# { |
| 628 | match s { |
| 629 | ClosingSubstaterust-analyzer cargo xml-rs 0.8.19 reader/lexer/ClosingSubstate#::Firstrust-analyzer cargo xml-rs 0.8.19 reader/lexer/ClosingSubstate#First# => match c { |
| 630 | ']' => self.move_torust-analyzer cargo xml-rs 0.8.19 reader/lexer/impl#[Lexer]move_to().(Staterust-analyzer cargo xml-rs 0.8.19 reader/lexer/State#::CDataClosingrust-analyzer cargo xml-rs 0.8.19 reader/lexer/State#CDataClosing#(ClosingSubstaterust-analyzer cargo xml-rs 0.8.19 reader/lexer/ClosingSubstate#::Secondrust-analyzer cargo xml-rs 0.8.19 reader/lexer/ClosingSubstate#Second#)), |
| 631 | _ => self.move_to_with_unreadrust-analyzer cargo xml-rs 0.8.19 reader/lexer/impl#[Lexer]move_to_with_unread().(Staterust-analyzer cargo xml-rs 0.8.19 reader/lexer/State#::InsideCdatarust-analyzer cargo xml-rs 0.8.19 reader/lexer/State#InsideCdata#, &[c], Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::Characterrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#Character#(']')), |
| 632 | }, |
| 633 | ClosingSubstaterust-analyzer cargo xml-rs 0.8.19 reader/lexer/ClosingSubstate#::Secondrust-analyzer cargo xml-rs 0.8.19 reader/lexer/ClosingSubstate#Second# => match c { |
| 634 | '>' => self.move_to_withrust-analyzer cargo xml-rs 0.8.19 reader/lexer/impl#[Lexer]move_to_with().(Staterust-analyzer cargo xml-rs 0.8.19 reader/lexer/State#::Normalrust-analyzer cargo xml-rs 0.8.19 reader/lexer/State#Normal#, Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::CDataEndrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#CDataEnd#), |
| 635 | _ => self.move_to_with_unreadrust-analyzer cargo xml-rs 0.8.19 reader/lexer/impl#[Lexer]move_to_with_unread().(Staterust-analyzer cargo xml-rs 0.8.19 reader/lexer/State#::InsideCdatarust-analyzer cargo xml-rs 0.8.19 reader/lexer/State#InsideCdata#, &[']', c], Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::Characterrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#Character#(']')), |
| 636 | }, |
| 637 | } |
| 638 | } |
| 639 | |
| 640 | /// Encountered ']' |
| 641 | fn invalid_cdata_closingrust-analyzer cargo xml-rs 0.8.19 reader/lexer/impl#[Lexer]invalid_cdata_closing().(&mut self, c: char, s: ClosingSubstaterust-analyzer cargo xml-rs 0.8.19 reader/lexer/ClosingSubstate#) -> Resultrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Result# { |
| 642 | match s { |
| 643 | ClosingSubstaterust-analyzer cargo xml-rs 0.8.19 reader/lexer/ClosingSubstate#::Firstrust-analyzer cargo xml-rs 0.8.19 reader/lexer/ClosingSubstate#First# => match c { |
| 644 | ']' => self.move_torust-analyzer cargo xml-rs 0.8.19 reader/lexer/impl#[Lexer]move_to().(Staterust-analyzer cargo xml-rs 0.8.19 reader/lexer/State#::InvalidCDataClosingrust-analyzer cargo xml-rs 0.8.19 reader/lexer/State#InvalidCDataClosing#(ClosingSubstaterust-analyzer cargo xml-rs 0.8.19 reader/lexer/ClosingSubstate#::Secondrust-analyzer cargo xml-rs 0.8.19 reader/lexer/ClosingSubstate#Second#)), |
| 645 | _ => self.move_to_with_unreadrust-analyzer cargo xml-rs 0.8.19 reader/lexer/impl#[Lexer]move_to_with_unread().(Staterust-analyzer cargo xml-rs 0.8.19 reader/lexer/State#::Normalrust-analyzer cargo xml-rs 0.8.19 reader/lexer/State#Normal#, &[c], Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::Characterrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#Character#(']')), |
| 646 | }, |
| 647 | ClosingSubstaterust-analyzer cargo xml-rs 0.8.19 reader/lexer/ClosingSubstate#::Secondrust-analyzer cargo xml-rs 0.8.19 reader/lexer/ClosingSubstate#Second# => match c { |
| 648 | '>' => self.move_to_withrust-analyzer cargo xml-rs 0.8.19 reader/lexer/impl#[Lexer]move_to_with().(self.normal_staterust-analyzer cargo xml-rs 0.8.19 reader/lexer/Lexer#normal_state., Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::CDataEndrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#CDataEnd#), |
| 649 | _ => self.move_to_with_unreadrust-analyzer cargo xml-rs 0.8.19 reader/lexer/impl#[Lexer]move_to_with_unread().(Staterust-analyzer cargo xml-rs 0.8.19 reader/lexer/State#::Normalrust-analyzer cargo xml-rs 0.8.19 reader/lexer/State#Normal#, &[']', c], Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::Characterrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#Character#(']')), |
| 650 | }, |
| 651 | } |
| 652 | } |
| 653 | } |
| 654 | |
| 655 | #[cfg(test)] |
| 656 | mod testsrust-analyzer cargo xml-rs 0.8.19 reader/lexer/tests/ { |
| 657 | use craterust-analyzer cargo xml-rs 0.8.19 crate/::{commonrust-analyzer cargo xml-rs 0.8.19 common/::Positionrust-analyzer cargo xml-rs 0.8.19 common/Position#, readerrust-analyzer cargo xml-rs 0.8.19 reader/::ParserConfig2rust-analyzer cargo xml-rs 0.8.19 reader/config/ParserConfig2#}; |
| 658 | use stdrust-analyzer cargo std https://github.com/rust-lang/rust/library/std crate/::iorust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/::{BufReaderrust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/buffered/bufreader/BufReader#, Cursorrust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/cursor/Cursor#}; |
| 659 | |
| 660 | use superrust-analyzer cargo xml-rs 0.8.19 reader/lexer/::{Lexerrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Lexer#, Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#}; |
| 661 | |
| 662 | macro_rules! assert_oksrust-analyzer cargo xml-rs 0.8.19 reader/lexer/tests/assert_oks!( |
| 663 | (for $lex:ident and $buf:ident ; $($e:expr)+) => ({ |
| 664 | $( |
| 665 | assert_eq!(Ok(Some($e)), $lex.next_token(&mut $buf)); |
| 666 | )+ |
| 667 | }) |
| 668 | ); |
| 669 | |
| 670 | macro_rules! assert_errrust-analyzer cargo xml-rs 0.8.19 reader/lexer/tests/assert_err!( |
| 671 | (for $lex:ident and $buf:ident expect row $r:expr ; $c:expr, $s:expr) => ({ |
| 672 | let err = $lex.next_token(&mut $buf); |
| 673 | assert!(err.is_err()); |
| 674 | let err = err.unwrap_err(); |
| 675 | assert_eq!($r as u64, err.position().row); |
| 676 | assert_eq!($c as u64, err.position().column); |
| 677 | }) |
| 678 | ); |
| 679 | |
| 680 | macro_rules! assert_nonerust-analyzer cargo xml-rs 0.8.19 reader/lexer/tests/assert_none!( |
| 681 | (for $lex:ident and $buf:ident) => ( |
| 682 | assert_eq!(Ok(None), $lex.next_token(&mut $buf)) |
| 683 | ) |
| 684 | ); |
| 685 | |
| 686 | fn make_lex_and_bufrust-analyzer cargo xml-rs 0.8.19 reader/lexer/tests/make_lex_and_buf().(s: &str) -> (Lexerrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Lexer#, BufReaderrust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/buffered/bufreader/BufReader#<Cursorrust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/cursor/Cursor#<Vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/Vec#<u8>>>) { |
| 687 | (Lexerrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Lexer#::newrust-analyzer cargo xml-rs 0.8.19 reader/lexer/impl#[Lexer]new().(&ParserConfig2rust-analyzer cargo xml-rs 0.8.19 reader/config/ParserConfig2#::defaultrust-analyzer cargo xml-rs 0.8.19 reader/config/impl#[ParserConfig2][Default]default().()), BufReaderrust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/buffered/bufreader/BufReader#::newrust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/buffered/bufreader/impl#[`BufReader<R>`]new().(Cursorrust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/cursor/Cursor#::newrust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/cursor/impl#[`Cursor<T>`]new().(s.to_ownedrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc str/impl#[str][ToOwned]to_owned().().into_bytesrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/impl#[String]into_bytes().()))) |
| 688 | } |
| 689 | |
| 690 | #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:] |
| 691 | fn tricky_pirust-analyzer cargo xml-rs 0.8.19 reader/lexer/tests/tricky_pi().() { |
| 692 | let (mut lex, mut buf) = make_lex_and_bufrust-analyzer cargo xml-rs 0.8.19 reader/lexer/tests/make_lex_and_buf().(r#"<?x<!-- &??><x>"#); |
| 693 | |
| 694 | assert_oksrust-analyzer cargo xml-rs 0.8.19 reader/lexer/tests/assert_oks!!(for lex and buf ; |
| 695 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::ProcessingInstructionStartrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#ProcessingInstructionStart# |
| 696 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::Characterrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#Character#('x') |
| 697 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::OpeningTagStartrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#OpeningTagStart# // processing of <?xml?> relies on the extra tokens |
| 698 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::Characterrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#Character#('!') |
| 699 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::Characterrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#Character#('-') |
| 700 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::Characterrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#Character#('-') |
| 701 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::Characterrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#Character#(' ') |
| 702 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::ReferenceStartrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#ReferenceStart# |
| 703 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::Characterrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#Character#('?') |
| 704 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::ProcessingInstructionEndrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#ProcessingInstructionEnd# |
| 705 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::OpeningTagStartrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#OpeningTagStart# |
| 706 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::Characterrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#Character#('x') |
| 707 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::TagEndrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#TagEnd# |
| 708 | ); |
| 709 | assert_nonerust-analyzer cargo xml-rs 0.8.19 reader/lexer/tests/assert_none!!(for lex and buf); |
| 710 | } |
| 711 | |
| 712 | #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:] |
| 713 | fn reparserrust-analyzer cargo xml-rs 0.8.19 reader/lexer/tests/reparser().() { |
| 714 | let (mut lex, mut buf) = make_lex_and_bufrust-analyzer cargo xml-rs 0.8.19 reader/lexer/tests/make_lex_and_buf().(r#"&a;"#); |
| 715 | |
| 716 | assert_oksrust-analyzer cargo xml-rs 0.8.19 reader/lexer/tests/assert_oks!!(for lex and buf ; |
| 717 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::ReferenceStartrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#ReferenceStart# |
| 718 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::Characterrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#Character#('a') |
| 719 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::ReferenceEndrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#ReferenceEnd# |
| 720 | ); |
| 721 | lex.reparserust-analyzer cargo xml-rs 0.8.19 reader/lexer/impl#[Lexer]reparse().("<hi/>").unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().(); |
| 722 | assert_oksrust-analyzer cargo xml-rs 0.8.19 reader/lexer/tests/assert_oks!!(for lex and buf ; |
| 723 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::OpeningTagStartrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#OpeningTagStart# |
| 724 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::Characterrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#Character#('h') |
| 725 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::Characterrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#Character#('i') |
| 726 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::EmptyTagEndrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#EmptyTagEnd# |
| 727 | ); |
| 728 | assert_nonerust-analyzer cargo xml-rs 0.8.19 reader/lexer/tests/assert_none!!(for lex and buf); |
| 729 | } |
| 730 | |
| 731 | #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:] |
| 732 | fn simple_lexer_testrust-analyzer cargo xml-rs 0.8.19 reader/lexer/tests/simple_lexer_test().() { |
| 733 | let (mut lex, mut buf) = make_lex_and_bufrust-analyzer cargo xml-rs 0.8.19 reader/lexer/tests/make_lex_and_buf().( |
| 734 | r#"<a p='q'> x<b z="y">d </b></a><p/> <?nm ?> <!-- a c --> "# |
| 735 | ); |
| 736 | |
| 737 | assert_oksrust-analyzer cargo xml-rs 0.8.19 reader/lexer/tests/assert_oks!!(for lex and buf ; |
| 738 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::OpeningTagStartrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#OpeningTagStart# |
| 739 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::Characterrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#Character#('a') |
| 740 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::Characterrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#Character#(' ') |
| 741 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::Characterrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#Character#('p') |
| 742 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::EqualsSignrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#EqualsSign# |
| 743 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::SingleQuoterust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#SingleQuote# |
| 744 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::Characterrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#Character#('q') |
| 745 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::SingleQuoterust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#SingleQuote# |
| 746 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::TagEndrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#TagEnd# |
| 747 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::Characterrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#Character#(' ') |
| 748 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::Characterrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#Character#('x') |
| 749 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::OpeningTagStartrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#OpeningTagStart# |
| 750 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::Characterrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#Character#('b') |
| 751 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::Characterrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#Character#(' ') |
| 752 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::Characterrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#Character#('z') |
| 753 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::EqualsSignrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#EqualsSign# |
| 754 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::DoubleQuoterust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#DoubleQuote# |
| 755 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::Characterrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#Character#('y') |
| 756 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::DoubleQuoterust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#DoubleQuote# |
| 757 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::TagEndrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#TagEnd# |
| 758 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::Characterrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#Character#('d') |
| 759 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::Characterrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#Character#('\t') |
| 760 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::ClosingTagStartrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#ClosingTagStart# |
| 761 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::Characterrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#Character#('b') |
| 762 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::TagEndrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#TagEnd# |
| 763 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::ClosingTagStartrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#ClosingTagStart# |
| 764 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::Characterrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#Character#('a') |
| 765 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::TagEndrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#TagEnd# |
| 766 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::OpeningTagStartrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#OpeningTagStart# |
| 767 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::Characterrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#Character#('p') |
| 768 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::EmptyTagEndrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#EmptyTagEnd# |
| 769 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::Characterrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#Character#(' ') |
| 770 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::ProcessingInstructionStartrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#ProcessingInstructionStart# |
| 771 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::Characterrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#Character#('n') |
| 772 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::Characterrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#Character#('m') |
| 773 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::Characterrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#Character#(' ') |
| 774 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::ProcessingInstructionEndrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#ProcessingInstructionEnd# |
| 775 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::Characterrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#Character#(' ') |
| 776 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::CommentStartrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#CommentStart# |
| 777 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::Characterrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#Character#(' ') |
| 778 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::Characterrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#Character#('a') |
| 779 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::Characterrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#Character#(' ') |
| 780 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::Characterrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#Character#('c') |
| 781 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::Characterrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#Character#(' ') |
| 782 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::CommentEndrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#CommentEnd# |
| 783 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::Characterrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#Character#(' ') |
| 784 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::ReferenceStartrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#ReferenceStart# |
| 785 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::Characterrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#Character#('n') |
| 786 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::Characterrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#Character#('b') |
| 787 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::Characterrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#Character#('s') |
| 788 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::Characterrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#Character#('p') |
| 789 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::ReferenceEndrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#ReferenceEnd# |
| 790 | ); |
| 791 | assert_nonerust-analyzer cargo xml-rs 0.8.19 reader/lexer/tests/assert_none!!(for lex and buf); |
| 792 | } |
| 793 | |
| 794 | #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:] |
| 795 | fn special_chars_testrust-analyzer cargo xml-rs 0.8.19 reader/lexer/tests/special_chars_test().() { |
| 796 | let (mut lex, mut buf) = make_lex_and_bufrust-analyzer cargo xml-rs 0.8.19 reader/lexer/tests/make_lex_and_buf().( |
| 797 | r#"?x!+ // -| ]z]]"# |
| 798 | ); |
| 799 | |
| 800 | assert_oksrust-analyzer cargo xml-rs 0.8.19 reader/lexer/tests/assert_oks!!(for lex and buf ; |
| 801 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::Characterrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#Character#('?') |
| 802 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::Characterrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#Character#('x') |
| 803 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::Characterrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#Character#('!') |
| 804 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::Characterrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#Character#('+') |
| 805 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::Characterrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#Character#(' ') |
| 806 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::Characterrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#Character#('/') |
| 807 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::Characterrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#Character#('/') |
| 808 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::Characterrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#Character#(' ') |
| 809 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::Characterrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#Character#('-') |
| 810 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::Characterrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#Character#('|') |
| 811 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::Characterrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#Character#(' ') |
| 812 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::Characterrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#Character#(']') |
| 813 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::Characterrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#Character#('z') |
| 814 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::Characterrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#Character#(']') |
| 815 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::Characterrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#Character#(']') |
| 816 | ); |
| 817 | assert_nonerust-analyzer cargo xml-rs 0.8.19 reader/lexer/tests/assert_none!!(for lex and buf); |
| 818 | } |
| 819 | |
| 820 | #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:] |
| 821 | fn cdata_testrust-analyzer cargo xml-rs 0.8.19 reader/lexer/tests/cdata_test().() { |
| 822 | let (mut lex, mut buf) = make_lex_and_bufrust-analyzer cargo xml-rs 0.8.19 reader/lexer/tests/make_lex_and_buf().( |
| 823 | r#"<a><![CDATA[x y ?]]> </a>"# |
| 824 | ); |
| 825 | |
| 826 | assert_oksrust-analyzer cargo xml-rs 0.8.19 reader/lexer/tests/assert_oks!!(for lex and buf ; |
| 827 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::OpeningTagStartrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#OpeningTagStart# |
| 828 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::Characterrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#Character#('a') |
| 829 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::TagEndrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#TagEnd# |
| 830 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::CDataStartrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#CDataStart# |
| 831 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::Characterrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#Character#('x') |
| 832 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::Characterrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#Character#(' ') |
| 833 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::Characterrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#Character#('y') |
| 834 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::Characterrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#Character#(' ') |
| 835 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::Characterrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#Character#('?') |
| 836 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::CDataEndrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#CDataEnd# |
| 837 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::Characterrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#Character#(' ') |
| 838 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::ClosingTagStartrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#ClosingTagStart# |
| 839 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::Characterrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#Character#('a') |
| 840 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::TagEndrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#TagEnd# |
| 841 | ); |
| 842 | assert_nonerust-analyzer cargo xml-rs 0.8.19 reader/lexer/tests/assert_none!!(for lex and buf); |
| 843 | } |
| 844 | |
| 845 | #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:] |
| 846 | fn cdata_closers_testrust-analyzer cargo xml-rs 0.8.19 reader/lexer/tests/cdata_closers_test().() { |
| 847 | let (mut lex, mut buf) = make_lex_and_bufrust-analyzer cargo xml-rs 0.8.19 reader/lexer/tests/make_lex_and_buf().( |
| 848 | r#"<![CDATA[] > ]> ]]><!---->]]<a>"# |
| 849 | ); |
| 850 | |
| 851 | assert_oksrust-analyzer cargo xml-rs 0.8.19 reader/lexer/tests/assert_oks!!(for lex and buf ; |
| 852 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::CDataStartrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#CDataStart# |
| 853 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::Characterrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#Character#(']') |
| 854 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::Characterrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#Character#(' ') |
| 855 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::Characterrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#Character#('>') |
| 856 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::Characterrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#Character#(' ') |
| 857 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::Characterrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#Character#(']') |
| 858 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::Characterrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#Character#('>') |
| 859 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::Characterrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#Character#(' ') |
| 860 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::CDataEndrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#CDataEnd# |
| 861 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::CommentStartrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#CommentStart# |
| 862 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::CommentEndrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#CommentEnd# |
| 863 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::Characterrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#Character#(']') |
| 864 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::Characterrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#Character#(']') |
| 865 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::OpeningTagStartrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#OpeningTagStart# |
| 866 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::Characterrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#Character#('a') |
| 867 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::TagEndrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#TagEnd# |
| 868 | ); |
| 869 | assert_nonerust-analyzer cargo xml-rs 0.8.19 reader/lexer/tests/assert_none!!(for lex and buf); |
| 870 | } |
| 871 | |
| 872 | #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:] |
| 873 | fn doctype_testrust-analyzer cargo xml-rs 0.8.19 reader/lexer/tests/doctype_test().() { |
| 874 | let (mut lex, mut buf) = make_lex_and_bufrust-analyzer cargo xml-rs 0.8.19 reader/lexer/tests/make_lex_and_buf().( |
| 875 | r#"<a><!DOCTYPE ab xx z> "# |
| 876 | ); |
| 877 | assert_oksrust-analyzer cargo xml-rs 0.8.19 reader/lexer/tests/assert_oks!!(for lex and buf ; |
| 878 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::OpeningTagStartrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#OpeningTagStart# |
| 879 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::Characterrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#Character#('a') |
| 880 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::TagEndrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#TagEnd# |
| 881 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::DoctypeStartrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#DoctypeStart# |
| 882 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::Characterrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#Character#(' ') |
| 883 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::Characterrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#Character#('a') |
| 884 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::Characterrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#Character#('b') |
| 885 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::Characterrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#Character#(' ') |
| 886 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::Characterrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#Character#('x') |
| 887 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::Characterrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#Character#('x') |
| 888 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::Characterrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#Character#(' ') |
| 889 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::Characterrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#Character#('z') |
| 890 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::TagEndrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#TagEnd# |
| 891 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::Characterrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#Character#(' ') |
| 892 | ); |
| 893 | assert_nonerust-analyzer cargo xml-rs 0.8.19 reader/lexer/tests/assert_none!!(for lex and buf); |
| 894 | } |
| 895 | |
| 896 | #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:] |
| 897 | fn tricky_commentsrust-analyzer cargo xml-rs 0.8.19 reader/lexer/tests/tricky_comments().() { |
| 898 | let (mut lex, mut buf) = make_lex_and_bufrust-analyzer cargo xml-rs 0.8.19 reader/lexer/tests/make_lex_and_buf().( |
| 899 | r#"<a><!-- C ->--></a>"# |
| 900 | ); |
| 901 | assert_oksrust-analyzer cargo xml-rs 0.8.19 reader/lexer/tests/assert_oks!!(for lex and buf ; |
| 902 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::OpeningTagStartrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#OpeningTagStart# |
| 903 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::Characterrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#Character#('a') |
| 904 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::TagEndrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#TagEnd# |
| 905 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::CommentStartrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#CommentStart# |
| 906 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::Characterrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#Character#(' ') |
| 907 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::Characterrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#Character#('C') |
| 908 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::Characterrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#Character#(' ') |
| 909 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::Characterrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#Character#('-') |
| 910 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::Characterrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#Character#('>') |
| 911 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::CommentEndrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#CommentEnd# |
| 912 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::ClosingTagStartrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#ClosingTagStart# |
| 913 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::Characterrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#Character#('a') |
| 914 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::TagEndrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#TagEnd# |
| 915 | ); |
| 916 | assert_nonerust-analyzer cargo xml-rs 0.8.19 reader/lexer/tests/assert_none!!(for lex and buf); |
| 917 | } |
| 918 | |
| 919 | #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:] |
| 920 | fn doctype_with_internal_subset_testrust-analyzer cargo xml-rs 0.8.19 reader/lexer/tests/doctype_with_internal_subset_test().() { |
| 921 | let (mut lex, mut buf) = make_lex_and_bufrust-analyzer cargo xml-rs 0.8.19 reader/lexer/tests/make_lex_and_buf().( |
| 922 | r#"<a><!DOCTYPE ab[<!ELEMENT ba ">>>"> ]> "# |
| 923 | ); |
| 924 | assert_oksrust-analyzer cargo xml-rs 0.8.19 reader/lexer/tests/assert_oks!!(for lex and buf ; |
| 925 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::OpeningTagStartrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#OpeningTagStart# |
| 926 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::Characterrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#Character#('a') |
| 927 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::TagEndrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#TagEnd# |
| 928 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::DoctypeStartrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#DoctypeStart# |
| 929 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::Characterrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#Character#(' ') |
| 930 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::Characterrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#Character#('a') |
| 931 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::Characterrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#Character#('b') |
| 932 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::Characterrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#Character#('[') |
| 933 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::MarkupDeclarationStartrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#MarkupDeclarationStart# |
| 934 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::Characterrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#Character#('E') |
| 935 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::Characterrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#Character#('L') |
| 936 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::Characterrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#Character#('E') |
| 937 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::Characterrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#Character#('M') |
| 938 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::Characterrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#Character#('E') |
| 939 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::Characterrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#Character#('N') |
| 940 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::Characterrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#Character#('T') |
| 941 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::Characterrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#Character#(' ') |
| 942 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::Characterrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#Character#('b') |
| 943 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::Characterrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#Character#('a') |
| 944 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::Characterrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#Character#(' ') |
| 945 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::DoubleQuoterust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#DoubleQuote# |
| 946 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::Characterrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#Character#('>') |
| 947 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::Characterrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#Character#('>') |
| 948 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::Characterrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#Character#('>') |
| 949 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::DoubleQuoterust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#DoubleQuote# |
| 950 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::TagEndrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#TagEnd# |
| 951 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::Characterrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#Character#(' ') |
| 952 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::Characterrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#Character#(']') |
| 953 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::TagEndrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#TagEnd# |
| 954 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::Characterrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#Character#(' ') |
| 955 | ); |
| 956 | assert_nonerust-analyzer cargo xml-rs 0.8.19 reader/lexer/tests/assert_none!!(for lex and buf); |
| 957 | } |
| 958 | |
| 959 | #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:] |
| 960 | fn doctype_internal_pi_commentrust-analyzer cargo xml-rs 0.8.19 reader/lexer/tests/doctype_internal_pi_comment().() { |
| 961 | let (mut lex, mut buf) = make_lex_and_bufrust-analyzer cargo xml-rs 0.8.19 reader/lexer/tests/make_lex_and_buf().( |
| 962 | "<!DOCTYPE a [\n<!ELEMENT l ANY> <!-- <?non?>--> <?pi > ?> \n]>" |
| 963 | ); |
| 964 | assert_oksrust-analyzer cargo xml-rs 0.8.19 reader/lexer/tests/assert_oks!!(for lex and buf ; |
| 965 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::DoctypeStartrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#DoctypeStart# |
| 966 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::Characterrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#Character#(' ') |
| 967 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::Characterrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#Character#('a') |
| 968 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::Characterrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#Character#(' ') |
| 969 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::Characterrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#Character#('[') |
| 970 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::Characterrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#Character#('\n') |
| 971 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::MarkupDeclarationStartrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#MarkupDeclarationStart# |
| 972 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::Characterrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#Character#('E') |
| 973 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::Characterrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#Character#('L') |
| 974 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::Characterrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#Character#('E') |
| 975 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::Characterrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#Character#('M') |
| 976 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::Characterrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#Character#('E') |
| 977 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::Characterrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#Character#('N') |
| 978 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::Characterrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#Character#('T') |
| 979 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::Characterrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#Character#(' ') |
| 980 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::Characterrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#Character#('l') |
| 981 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::Characterrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#Character#(' ') |
| 982 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::Characterrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#Character#('A') |
| 983 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::Characterrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#Character#('N') |
| 984 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::Characterrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#Character#('Y') |
| 985 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::TagEndrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#TagEnd# |
| 986 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::Characterrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#Character#(' ') |
| 987 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::CommentStartrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#CommentStart# |
| 988 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::Characterrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#Character#(' ') |
| 989 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::Characterrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#Character#('<') |
| 990 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::Characterrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#Character#('?') |
| 991 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::Characterrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#Character#('n') |
| 992 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::Characterrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#Character#('o') |
| 993 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::Characterrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#Character#('n') |
| 994 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::Characterrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#Character#('?') |
| 995 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::Characterrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#Character#('>') |
| 996 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::CommentEndrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#CommentEnd# |
| 997 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::Characterrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#Character#(' ') |
| 998 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::ProcessingInstructionStartrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#ProcessingInstructionStart# |
| 999 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::Characterrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#Character#('p') |
| 1000 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::Characterrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#Character#('i') |
| 1001 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::Characterrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#Character#(' ') |
| 1002 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::TagEndrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#TagEnd# // not really |
| 1003 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::Characterrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#Character#(' ') |
| 1004 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::ProcessingInstructionEndrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#ProcessingInstructionEnd# |
| 1005 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::Characterrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#Character#(' ') |
| 1006 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::Characterrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#Character#('\n') |
| 1007 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::Characterrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#Character#(']') |
| 1008 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::TagEndrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#TagEnd# // DTD |
| 1009 | ); |
| 1010 | assert_nonerust-analyzer cargo xml-rs 0.8.19 reader/lexer/tests/assert_none!!(for lex and buf); |
| 1011 | } |
| 1012 | |
| 1013 | #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:] |
| 1014 | fn end_of_stream_handling_okrust-analyzer cargo xml-rs 0.8.19 reader/lexer/tests/end_of_stream_handling_ok().() { |
| 1015 | macro_rules! eof_checkrust-analyzer cargo xml-rs 0.8.19 reader/lexer/tests/eof_check!( |
| 1016 | ($data:expr ; $token:expr) => ({ |
| 1017 | let (mut lex, mut buf) = make_lex_and_buf($data); |
| 1018 | assert_oks!(for lex and buf ; $token); |
| 1019 | assert_none!(for lex and buf); |
| 1020 | }) |
| 1021 | ); |
| 1022 | eof_checkrust-analyzer cargo xml-rs 0.8.19 reader/lexer/tests/eof_check!!("?" ; Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::Characterrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#Character#('?')); |
| 1023 | eof_checkrust-analyzer cargo xml-rs 0.8.19 reader/lexer/tests/eof_check!!("/" ; Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::Characterrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#Character#('/')); |
| 1024 | eof_checkrust-analyzer cargo xml-rs 0.8.19 reader/lexer/tests/eof_check!!("-" ; Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::Characterrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#Character#('-')); |
| 1025 | eof_checkrust-analyzer cargo xml-rs 0.8.19 reader/lexer/tests/eof_check!!("]" ; Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::Characterrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#Character#(']')); |
| 1026 | eof_checkrust-analyzer cargo xml-rs 0.8.19 reader/lexer/tests/eof_check!!("]" ; Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::Characterrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#Character#(']')); |
| 1027 | eof_checkrust-analyzer cargo xml-rs 0.8.19 reader/lexer/tests/eof_check!!("]" ; Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::Characterrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#Character#(']')); |
| 1028 | } |
| 1029 | |
| 1030 | #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:] |
| 1031 | fn end_of_stream_handling_errorrust-analyzer cargo xml-rs 0.8.19 reader/lexer/tests/end_of_stream_handling_error().() { |
| 1032 | macro_rules! eof_checkrust-analyzer cargo xml-rs 0.8.19 reader/lexer/tests/eof_check!( |
| 1033 | ($data:expr; $r:expr, $c:expr) => ({ |
| 1034 | let (mut lex, mut buf) = make_lex_and_buf($data); |
| 1035 | assert_err!(for lex and buf expect row $r ; $c, "Unexpected end of stream"); |
| 1036 | assert_none!(for lex and buf); |
| 1037 | }) |
| 1038 | ); |
| 1039 | eof_checkrust-analyzer cargo xml-rs 0.8.19 reader/lexer/tests/eof_check!!("<" ; 0, 1); |
| 1040 | eof_checkrust-analyzer cargo xml-rs 0.8.19 reader/lexer/tests/eof_check!!("<!" ; 0, 2); |
| 1041 | eof_checkrust-analyzer cargo xml-rs 0.8.19 reader/lexer/tests/eof_check!!("<!-" ; 0, 3); |
| 1042 | eof_checkrust-analyzer cargo xml-rs 0.8.19 reader/lexer/tests/eof_check!!("<![" ; 0, 3); |
| 1043 | eof_checkrust-analyzer cargo xml-rs 0.8.19 reader/lexer/tests/eof_check!!("<![C" ; 0, 4); |
| 1044 | eof_checkrust-analyzer cargo xml-rs 0.8.19 reader/lexer/tests/eof_check!!("<![CD" ; 0, 5); |
| 1045 | eof_checkrust-analyzer cargo xml-rs 0.8.19 reader/lexer/tests/eof_check!!("<![CDA" ; 0, 6); |
| 1046 | eof_checkrust-analyzer cargo xml-rs 0.8.19 reader/lexer/tests/eof_check!!("<![CDAT" ; 0, 7); |
| 1047 | eof_checkrust-analyzer cargo xml-rs 0.8.19 reader/lexer/tests/eof_check!!("<![CDATA" ; 0, 8); |
| 1048 | } |
| 1049 | |
| 1050 | #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:] |
| 1051 | fn error_in_comment_or_cdata_prefixrust-analyzer cargo xml-rs 0.8.19 reader/lexer/tests/error_in_comment_or_cdata_prefix().() { |
| 1052 | let (mut lex, mut buf) = make_lex_and_bufrust-analyzer cargo xml-rs 0.8.19 reader/lexer/tests/make_lex_and_buf().("<!x"); |
| 1053 | assert_errrust-analyzer cargo xml-rs 0.8.19 reader/lexer/tests/assert_err!!(for lex and buf expect row 0 ; 0, |
| 1054 | "Unexpected token '<!' before 'x'" |
| 1055 | ); |
| 1056 | |
| 1057 | let (mut lex, mut buf) = make_lex_and_bufrust-analyzer cargo xml-rs 0.8.19 reader/lexer/tests/make_lex_and_buf().("<!x"); |
| 1058 | lex.disable_errorsrust-analyzer cargo xml-rs 0.8.19 reader/lexer/impl#[Lexer]disable_errors().(); |
| 1059 | assert_oksrust-analyzer cargo xml-rs 0.8.19 reader/lexer/tests/assert_oks!!(for lex and buf ; |
| 1060 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::Characterrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#Character#('<') |
| 1061 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::Characterrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#Character#('!') |
| 1062 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::Characterrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#Character#('x') |
| 1063 | ); |
| 1064 | assert_nonerust-analyzer cargo xml-rs 0.8.19 reader/lexer/tests/assert_none!!(for lex and buf); |
| 1065 | } |
| 1066 | |
| 1067 | #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:] |
| 1068 | fn error_in_comment_startedrust-analyzer cargo xml-rs 0.8.19 reader/lexer/tests/error_in_comment_started().() { |
| 1069 | let (mut lex, mut buf) = make_lex_and_bufrust-analyzer cargo xml-rs 0.8.19 reader/lexer/tests/make_lex_and_buf().("<!-\t"); |
| 1070 | assert_errrust-analyzer cargo xml-rs 0.8.19 reader/lexer/tests/assert_err!!(for lex and buf expect row 0 ; 0, |
| 1071 | "Unexpected token '<!-' before '\t'" |
| 1072 | ); |
| 1073 | |
| 1074 | let (mut lex, mut buf) = make_lex_and_bufrust-analyzer cargo xml-rs 0.8.19 reader/lexer/tests/make_lex_and_buf().("<!-\t"); |
| 1075 | lex.disable_errorsrust-analyzer cargo xml-rs 0.8.19 reader/lexer/impl#[Lexer]disable_errors().(); |
| 1076 | assert_oksrust-analyzer cargo xml-rs 0.8.19 reader/lexer/tests/assert_oks!!(for lex and buf ; |
| 1077 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::Characterrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#Character#('<') |
| 1078 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::Characterrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#Character#('!') |
| 1079 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::Characterrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#Character#('-') |
| 1080 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::Characterrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#Character#('\t') |
| 1081 | ); |
| 1082 | assert_nonerust-analyzer cargo xml-rs 0.8.19 reader/lexer/tests/assert_none!!(for lex and buf); |
| 1083 | } |
| 1084 | |
| 1085 | #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:] |
| 1086 | fn error_in_comment_two_dashes_not_at_endrust-analyzer cargo xml-rs 0.8.19 reader/lexer/tests/error_in_comment_two_dashes_not_at_end().() { |
| 1087 | let (mut lex, mut buf) = make_lex_and_bufrust-analyzer cargo xml-rs 0.8.19 reader/lexer/tests/make_lex_and_buf().("--x"); |
| 1088 | lex.strust-analyzer cargo xml-rs 0.8.19 reader/lexer/Lexer#st. = superrust-analyzer cargo xml-rs 0.8.19 reader/lexer/::Staterust-analyzer cargo xml-rs 0.8.19 reader/lexer/State#::InsideCommentrust-analyzer cargo xml-rs 0.8.19 reader/lexer/State#InsideComment#; |
| 1089 | assert_errrust-analyzer cargo xml-rs 0.8.19 reader/lexer/tests/assert_err!!(for lex and buf expect row 0; 0, |
| 1090 | "Unexpected token '--' before 'x'" |
| 1091 | ); |
| 1092 | |
| 1093 | let (mut lex, mut buf) = make_lex_and_bufrust-analyzer cargo xml-rs 0.8.19 reader/lexer/tests/make_lex_and_buf().("--x"); |
| 1094 | assert_oksrust-analyzer cargo xml-rs 0.8.19 reader/lexer/tests/assert_oks!!(for lex and buf ; |
| 1095 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::Characterrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#Character#('-') |
| 1096 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::Characterrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#Character#('-') |
| 1097 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::Characterrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#Character#('x') |
| 1098 | ); |
| 1099 | } |
| 1100 | |
| 1101 | macro_rules! check_caserust-analyzer cargo xml-rs 0.8.19 reader/lexer/tests/check_case!( |
| 1102 | ($chunk:expr, $app:expr; $data:expr; $r:expr, $c:expr, $s:expr) => ({ |
| 1103 | let (mut lex, mut buf) = make_lex_and_buf($data); |
| 1104 | assert_err!(for lex and buf expect row $r ; $c, $s); |
| 1105 | |
| 1106 | let (mut lex, mut buf) = make_lex_and_buf($data); |
| 1107 | lex.disable_errors(); |
| 1108 | for c in $chunk.chars() { |
| 1109 | assert_eq!(Ok(Some(Token::Character(c))), lex.next_token(&mut buf)); |
| 1110 | } |
| 1111 | assert_oks!(for lex and buf ; |
| 1112 | Token::Character($app) |
| 1113 | ); |
| 1114 | assert_none!(for lex and buf); |
| 1115 | }) |
| 1116 | ); |
| 1117 | |
| 1118 | #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:] |
| 1119 | fn token_sizerust-analyzer cargo xml-rs 0.8.19 reader/lexer/tests/token_size().() { |
| 1120 | assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(4, stdrust-analyzer cargo std https://github.com/rust-lang/rust/library/std crate/::memrust-analyzer cargo core https://github.com/rust-lang/rust/library/core mem/::size_ofrust-analyzer cargo core https://github.com/rust-lang/rust/library/core mem/size_of().::<Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#>()); |
| 1121 | assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(2, stdrust-analyzer cargo std https://github.com/rust-lang/rust/library/std crate/::memrust-analyzer cargo core https://github.com/rust-lang/rust/library/core mem/::size_ofrust-analyzer cargo core https://github.com/rust-lang/rust/library/core mem/size_of().::<superrust-analyzer cargo xml-rs 0.8.19 reader/lexer/::Staterust-analyzer cargo xml-rs 0.8.19 reader/lexer/State#>()); |
| 1122 | } |
| 1123 | |
| 1124 | #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:] |
| 1125 | fn error_in_cdata_startedrust-analyzer cargo xml-rs 0.8.19 reader/lexer/tests/error_in_cdata_started().() { |
| 1126 | check_caserust-analyzer cargo xml-rs 0.8.19 reader/lexer/tests/check_case!!("<![", '['; "<![[" ; 0, 0, "Unexpected token '<![' before '['"); |
| 1127 | check_caserust-analyzer cargo xml-rs 0.8.19 reader/lexer/tests/check_case!!("<![C", '['; "<![C[" ; 0, 0, "Unexpected token '<![C' before '['"); |
| 1128 | check_caserust-analyzer cargo xml-rs 0.8.19 reader/lexer/tests/check_case!!("<![CD", '['; "<![CD[" ; 0, 0, "Unexpected token '<![CD' before '['"); |
| 1129 | check_caserust-analyzer cargo xml-rs 0.8.19 reader/lexer/tests/check_case!!("<![CDA", '['; "<![CDA[" ; 0, 0, "Unexpected token '<![CDA' before '['"); |
| 1130 | check_caserust-analyzer cargo xml-rs 0.8.19 reader/lexer/tests/check_case!!("<![CDAT", '['; "<![CDAT[" ; 0, 0, "Unexpected token '<![CDAT' before '['"); |
| 1131 | check_caserust-analyzer cargo xml-rs 0.8.19 reader/lexer/tests/check_case!!("<![CDATA", '|'; "<![CDATA|" ; 0, 0, "Unexpected token '<![CDATA' before '|'"); |
| 1132 | } |
| 1133 | |
| 1134 | #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:] |
| 1135 | fn error_in_doctype_startedrust-analyzer cargo xml-rs 0.8.19 reader/lexer/tests/error_in_doctype_started().() { |
| 1136 | check_caserust-analyzer cargo xml-rs 0.8.19 reader/lexer/tests/check_case!!("<!D", 'a'; "<!Da" ; 0, 0, "Unexpected token '<!D' before 'a'"); |
| 1137 | check_caserust-analyzer cargo xml-rs 0.8.19 reader/lexer/tests/check_case!!("<!DO", 'b'; "<!DOb" ; 0, 0, "Unexpected token '<!DO' before 'b'"); |
| 1138 | check_caserust-analyzer cargo xml-rs 0.8.19 reader/lexer/tests/check_case!!("<!DOC", 'c'; "<!DOCc" ; 0, 0, "Unexpected token '<!DOC' before 'c'"); |
| 1139 | check_caserust-analyzer cargo xml-rs 0.8.19 reader/lexer/tests/check_case!!("<!DOCT", 'd'; "<!DOCTd" ; 0, 0, "Unexpected token '<!DOCT' before 'd'"); |
| 1140 | check_caserust-analyzer cargo xml-rs 0.8.19 reader/lexer/tests/check_case!!("<!DOCTY", 'e'; "<!DOCTYe" ; 0, 0, "Unexpected token '<!DOCTY' before 'e'"); |
| 1141 | check_caserust-analyzer cargo xml-rs 0.8.19 reader/lexer/tests/check_case!!("<!DOCTYP", 'f'; "<!DOCTYPf" ; 0, 0, "Unexpected token '<!DOCTYP' before 'f'"); |
| 1142 | } |
| 1143 | |
| 1144 | |
| 1145 | |
| 1146 | #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:] |
| 1147 | fn issue_98_cdata_ending_with_right_bracketrust-analyzer cargo xml-rs 0.8.19 reader/lexer/tests/issue_98_cdata_ending_with_right_bracket().() { |
| 1148 | let (mut lex, mut buf) = make_lex_and_bufrust-analyzer cargo xml-rs 0.8.19 reader/lexer/tests/make_lex_and_buf().( |
| 1149 | r#"<![CDATA[Foo [Bar]]]>"# |
| 1150 | ); |
| 1151 | |
| 1152 | assert_oksrust-analyzer cargo xml-rs 0.8.19 reader/lexer/tests/assert_oks!!(for lex and buf ; |
| 1153 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::CDataStartrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#CDataStart# |
| 1154 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::Characterrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#Character#('F') |
| 1155 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::Characterrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#Character#('o') |
| 1156 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::Characterrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#Character#('o') |
| 1157 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::Characterrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#Character#(' ') |
| 1158 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::Characterrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#Character#('[') |
| 1159 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::Characterrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#Character#('B') |
| 1160 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::Characterrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#Character#('a') |
| 1161 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::Characterrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#Character#('r') |
| 1162 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::Characterrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#Character#(']') |
| 1163 | Tokenrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#::CDataEndrust-analyzer cargo xml-rs 0.8.19 reader/lexer/Token#CDataEnd# |
| 1164 | ); |
| 1165 | assert_nonerust-analyzer cargo xml-rs 0.8.19 reader/lexer/tests/assert_none!!(for lex and buf); |
| 1166 | } |
| 1167 | } |