Struct syntect::parsing::syntax_definition::MatchPattern [] [src]

pub struct MatchPattern {
    pub has_captures: bool,
    pub regex_str: String,
    pub regex: Option<Regex>,
    pub scope: Vec<Scope>,
    pub captures: Option<CaptureMapping>,
    pub operation: MatchOperation,
    pub with_prototype: Option<ContextPtr>,
}

Fields

Methods

impl MatchPattern
[src]

substitutes back-refs in Regex with regions from s used for match patterns which refer to captures from the pattern that pushed them.

Used by the parser to compile a regex which needs to reference regions from another matched pattern.

Makes sure the regex is compiled if it doesn't have captures. May compile the regex if it isn't, panicing if compilation fails.

Trait Implementations

impl Debug for MatchPattern
[src]

Formats the value using the given formatter.

impl Eq for MatchPattern
[src]

impl PartialEq for MatchPattern
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.