|
myshell 2.0.0
|
Token structure and related types. More...
Go to the source code of this file.
Classes | |
| struct | Token |
| Structure representing a token. More... | |
Typedefs | |
| using | tokens_t = std::vector<Token> |
Variables | |
| const std::map< TokenType, int > | token_flags |
| The internal token flags table. | |
| constexpr int | UNSUPPORTED = 1 << 0 |
| Unsupported token. Parser will throw an error if it encounters this. | |
| constexpr int | GLOB_EXPAND = 1 << 1 |
| Tells the parser to expand globs in this kind of token. | |
| constexpr int | VAR_EXPAND = 1 << 2 |
| Tells the parser to expand variables in this kind of token. | |
| constexpr int | WORD_LIKE = 1 << 3 |
| This token is a potential argument/command that will be forwarded to argv. | |
| constexpr int | NO_WORD_SPLIT = 1 << 4 |
| This token is not eligible for word splitting. | |
| constexpr int | COMMAND_SEPARATOR = 1 << 5 |
| This token separates simple commands. Used for parsing. | |
| constexpr int | REDIRECT = 1 << 6 |
| This token is a redirect. Used for parsing. | |
| constexpr int | ASSIGNMENT_WORD = 1 << 7 |
| This token is an assignment word. Used for parsing. | |
Token structure and related types.
|
extern |
The internal token flags table.
Maps token types to their corresponding flags.
We ignore masks in the program name. However, this behavior is unnatural.