lib_ruby_parser_ast/traverse/finder/pattern/
error.rs

1/// An error that is returned when attempting to build
2/// a finder::Item from a string that can't be recognized
3#[derive(Debug)]
4pub struct PatternError {
5    /// Pattern that wasn't recognozed
6    pub pattern: String,
7}
8
9impl std::fmt::Display for PatternError {
10    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
11        write!(f, "PatternError: unsupported pattern {}", self.pattern)
12    }
13}
14
15impl std::error::Error for PatternError {}