Enum wikitext_parser::ParserErrorKind
source · pub enum ParserErrorKind {
Show 17 variants
SecondRootSection {
label: String,
},
SectionLevelTooDeep {
level: usize,
},
UnmatchedDoubleCloseBrace,
UnmatchedDoubleOpenBrace,
UnmatchedDoubleCloseBracket,
UnmatchedDoubleOpenBracket,
UnmatchedNoWikiClose,
UnmatchedNoWikiOpen,
UnexpectedTokenInTag {
token: String,
},
UnexpectedTokenInParameter {
token: String,
},
UnexpectedTokenInLink {
token: String,
},
UnexpectedTokenInLinkLabel {
token: String,
},
UnexpectedTokenInFormattedText {
token: String,
},
UnexpectedTokenInListItem {
token: String,
},
UnexpectedToken {
expected: String,
actual: String,
},
UnclosedTextFormatting {
formatting: TextFormatting,
},
UnexpectedEof,
}
Expand description
The kind of parser error.
Variants§
SecondRootSection
Found a second root section, but only one is allowed.
SectionLevelTooDeep
Found a section at a level that is deeper than supported.
UnmatchedDoubleCloseBrace
Found a double close brace that does not match any opened one.
UnmatchedDoubleOpenBrace
Found a double open brace that does not match any closed one.
UnmatchedDoubleCloseBracket
Found a double close bracket that does not match any opened one.
UnmatchedDoubleOpenBracket
Found a double open bracket that does not match any closed one.
UnmatchedNoWikiClose
Found a </nowiki>
that does not match any <nowiki>
.
UnmatchedNoWikiOpen
Found a <nowiki>
that does not match any </nowiki>
.
UnexpectedTokenInTag
A tag contains a token that does not belong there.
UnexpectedTokenInParameter
A parameter contains a token that does not belong there.
UnexpectedTokenInLink
A link contains a token that does not belong there.
UnexpectedTokenInLinkLabel
A link label contains a token that does not belong there.
UnexpectedTokenInFormattedText
A formatted piece of text contains a token that does not belong there.
UnexpectedTokenInListItem
A link label contains a token that does not belong there.
UnexpectedToken
Fields
A token was found at a place where it does not belong.
UnclosedTextFormatting
Fields
formatting: TextFormatting
The unclosed formatting expression.
A text formatting expression was not closed.
UnexpectedEof
The end of file was found, but further tokens were expected.
Trait Implementations§
source§impl Debug for ParserErrorKind
impl Debug for ParserErrorKind
source§impl Display for ParserErrorKind
impl Display for ParserErrorKind
source§impl PartialEq<ParserErrorKind> for ParserErrorKind
impl PartialEq<ParserErrorKind> for ParserErrorKind
source§fn eq(&self, other: &ParserErrorKind) -> bool
fn eq(&self, other: &ParserErrorKind) -> bool
self
and other
values to be equal, and is used
by ==
.