TokenMatcher
Token matchers are combined with TokenReader in order to match sequences of tokens. The following token matchers are available:
- anySymbol
- anyWord
- reallit
- wildcard (any Token)
- boollit
- byteslit
- group
- intlit
- oneOf
- strlit
- symbol
- word
export interface TokenMatcher {
matches(t: Token): undefined | T
toString(): string
}
Properties
matches
tokenMatcher.matches satisfies (t: Token) => undefined | T
toString
tokenMatcher.toString satisfies () => string