new Token(type, content, aliasopt, matchedStropt)
- Source:
Creates a new token.
Parameters:
| Name | Type | Attributes | Default | Description | 
|---|---|---|---|---|
| type | string | See  | ||
| content | string | TokenStream | See  | ||
| alias | string | Array.<string> | <optional> | The alias(es) of the token. | |
| matchedStr | string | <optional> | "" | A copy of the full string this token was created from. | 
Members
alias :string|Array.<string>
- Source:
- See:
The alias(es) of the token.
Type:
- string | Array.<string>
content :string|TokenStream
- Source:
The strings or tokens contained by this token.
This will be a token stream if the pattern matched also defined an inside grammar.
Type:
- string | TokenStream
type :string
- Source:
- See:
The type of the token.
This is usually the key of a pattern in a Grammar.
Type:
- string