TokenMatcher
export interface TokenMatcher<T extends Token = Token> {
matches(t: Token): undefined | T
toString(): string
}
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
Properties
matches
matches(t: Token): undefined | T
toString
toString(): string