TokenGroup
class TokenGroup
A group of tokens specified by specific tokens or token types.
constructor TokenGroup
Create a token group that contains no or all tokens.
| TokenGroup | ( | bool contains_all = false | ); |
| PARAMETER | DESCRIPTION |
|---|---|
contains_all |
If |
constructor TokenGroup
Create a token group that contains all tokens of the given type.
| TokenGroup | ( | Token::Type type | ); |
| PARAMETER | DESCRIPTION |
|---|---|
type |
The type of tokens to include in the group. |
constructor TokenGroup
Create a token group that contains the given tokens.
| TokenGroup | ( | std::unordered_set< Token::Type > types, | |
| std::unordered_set< Token > tokens, | |||
| std::string name | ); |
| PARAMETER | DESCRIPTION |
|---|---|
types |
|
tokens |
The tokens to include in the group. |
name |
The name of the token group. |
method containsconst
Check if the group contains a given token.
| bool contains | ( | const Token & token | ) const; |
| PARAMETER | DESCRIPTION |
|---|---|
token |
The token to check. |
| RETURNS | DESCRIPTION |
|---|---|
bool |
|
member allstatic
A token group that contains all tokens.
member contains_all
Whether the group contains all tokens.
member name
The name of the token group.
member newlinestatic
A token group that contains the newline token.
member tokens
The specific tokens contained in the group.
member types
The token types contained in the group.