Envelope Pattern TypeScript - v1.0.0-alpha.20
    Preparing search index...

    Interface Matcher

    Matcher interface for pattern matching against envelopes.

    Corresponds to the Rust Matcher trait in matcher.rs

    interface Matcher {
        pathsWithCaptures(haystack: Envelope): [Path[], Map<string, Path[]>];
        paths(haystack: Envelope): Path[];
        matches(haystack: Envelope): boolean;
        compile(code: Instr[], literals: Pattern[], captures: string[]): void;
        isComplex(): boolean;
    }

    Implemented by

    Index

    Methods

    • Returns true if the Display of the matcher is complex, i.e. contains nested patterns or other complex structures that require its text rendering to be surrounded by grouping parentheses.

      Returns boolean