See Token#type
See Token#content
Optional
alias: TokenName | TokenName[]The alias(es) of the token.
A copy of the full string this token was created from.
Optional
aliasThe alias(es) of the token.
The strings or tokens contained by this token.
This will be a token stream if the pattern matched also defined an inside
grammar.
Internal
lengthLength of the full string this token was created from.
Only used internally. The API does not guarantee that this field has any particular value or meaning.
The type of the token.
This is usually the key of a pattern in a Grammar.
Creates a new token.