class

Cronic::SeqMatcher

Inherits Reference < Object

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.

Class methods

match(pattern, tokens : Array(Token)) : Bool
Source
match_maybe(pattern, tokens : Array(Token)) : Bool
Source
match_one(pat, tok : Token) : Bool
Source