class Cronic::SeqMatcher

Overview

Contains a set of matching routines, which work kind of like a weak Regex, but for matching Classes against the Tags on a token. Supports a single Sequence with a single nesting of Or / maybe.

The methods contained within work recursively

TODO Support nesting of sub-sequences within an Or sequence.

Defined in:

cronic/seq_matcher.cr

Class Method Summary

Class Method Detail

def self.match(pattern, tokens : Array(Token)) : Bool #

[View source]
def self.match_maybe(pattern, tokens : Array(Token)) : Bool #

[View source]
def self.match_one(pat, tok : Token) : Bool #

[View source]