Skip to content

Cm5Mode.token method

Cm5Mode › token

Unofficial

Reads one token from the stream, optionally updates the state, and returns a style string.

Signature:

token(stream: Cm5StringStream, state: T): null | string

Parameters:

Parameter Type Description
stream Cm5StringStream The string stream to read from.
state T The current parser state.

Returns: null | stringA style string, or null for unstyled tokens.