1use super::Pattern; 2 3/// A [`Pattern`] that will match any single token. 4pub struct AnyPattern; 5 6impl Pattern for AnyPattern { 7 fn matches(&self, tokens: &[crate::Token], _source: &[char]) -> usize { 8 if tokens.is_empty() { 0 } else { 1 } 9 } 10}