grit_pattern_matcher::pattern

Trait AstLeafNodePattern

source
pub trait AstLeafNodePattern<Q: QueryContext>:
    Clone
    + Debug
    + Matcher<Q>
    + PatternName
    + Sized {
    // Provided method
    fn text(&self) -> Option<&str> { ... }
}
Expand description

Type of pattern that matches against an individual AST leaf node.

Provided Methods§

source

fn text(&self) -> Option<&str>

Provides a possible text value for the leaf node. This is not mandatory, but enables some advanced functionality.

Object Safety§

This trait is not object safe.

Implementors§