HomeReferenceEvent.h ⇀ Tokenize

Tokenize function

Utility function to transform any event stream into a token stream.

Syntax

template <typename TEvents>
TempEvents<D,Token,/*unspecified*/> Tokenize(TEvents&& source)

Semantics

Emits a token for any event that passes source.

Equivalent to Transform(source, Tokenizer()) with

struct Tokenizer
{
    template <typename T>
    Token operator()(const T&) const { return Token::value; }
};