pub enum ParseTreePatternError {
UnterminatedTag {
pattern: String,
},
MissingStartTag {
pattern: String,
},
DelimitersOutOfOrder {
pattern: String,
},
EmptyTag {
pattern: String,
},
UnknownToken {
name: String,
pattern: String,
},
UnknownRule {
name: String,
pattern: String,
},
InvalidTag {
tag: String,
pattern: String,
},
Tokenization {
message: String,
},
StartRuleDoesNotConsumeFullPattern {
pattern: String,
},
CannotInvokeStartRule {
rule_index: usize,
message: String,
},
BypassAtn {
message: String,
},
EmptyDelimiter {
which: &'static str,
},
}Expand description
An invalid tree pattern or a failure while compiling one.
Variants§
UnterminatedTag
A start delimiter was seen without a matching stop delimiter.
MissingStartTag
A stop delimiter was seen without a preceding start delimiter.
DelimitersOutOfOrder
A stop delimiter appeared at or before its start delimiter.
EmptyTag
A tag was empty (<> or <label:>).
UnknownToken
A <TOKEN> tag named a token the grammar does not define.
UnknownRule
A <rule> tag named a parser rule the grammar does not define.
InvalidTag
A tag started with neither an upper- nor lower-case letter, so it could not be classified as a token or rule reference.
Tokenization
Lexing a literal chunk with the real lexer failed.
StartRuleDoesNotConsumeFullPattern
The start rule did not consume the whole pattern (ANTLR issue #413).
CannotInvokeStartRule
Interpreting the pattern token stream failed.
BypassAtn
The rule-bypass transform of the grammar ATN failed.
EmptyDelimiter
ParseTreePatternMatcher::set_delimiters was given an empty start or
stop delimiter.
Trait Implementations§
Source§impl Clone for ParseTreePatternError
impl Clone for ParseTreePatternError
Source§fn clone(&self) -> ParseTreePatternError
fn clone(&self) -> ParseTreePatternError
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ParseTreePatternError
impl Debug for ParseTreePatternError
Source§impl Display for ParseTreePatternError
impl Display for ParseTreePatternError
impl Eq for ParseTreePatternError
Source§impl Error for ParseTreePatternError
impl Error for ParseTreePatternError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()