Single argument token.
More...
#include <senf/Utils/Console/Parse.hh>
|
enum | TokenType {
None = 0,
PathSeparator = 0x0001,
ArgumentGroupOpen = 0x0002,
ArgumentGroupClose = 0x0004,
DirectoryGroupOpen = 0x0008,
DirectoryGroupClose = 0x0010,
CommandTerminator = 0x0020,
OtherPunctuation = 0x0040,
BasicString = 0x0080,
HexString = 0x0100,
Word = 0x0200
} |
|
enum | TokenGroup {
ArgumentGrouper,
DirectoryGrouper,
Punctuation,
String,
SimpleArgument
} |
|
Single argument token.
All command arguments are split into tokens by the parser. Each token is returned as an Token instance.
Definition at line 234 of file Parse.hh.
◆ TokenGroup
Enumerator |
---|
ArgumentGrouper | |
DirectoryGrouper | |
Punctuation | |
String | |
SimpleArgument | |
Definition at line 251 of file Parse.hh.
◆ TokenType
Enumerator |
---|
None | |
PathSeparator | |
ArgumentGroupOpen | |
ArgumentGroupClose | |
DirectoryGroupOpen | |
DirectoryGroupClose | |
CommandTerminator | |
OtherPunctuation | |
BasicString | |
HexString | |
Word | |
Definition at line 237 of file Parse.hh.
◆ Token() [1/3]
senf::console::Token::Token |
( |
| ) |
|
◆ Token() [2/3]
senf::console::Token::Token |
( |
TokenType |
type, |
|
|
std::string |
token |
|
) |
| |
Create token with given type and value.
◆ Token() [3/3]
senf::console::Token::Token |
( |
TokenType |
type, |
|
|
std::string |
token, |
|
|
detail::FilePositionWithIndex const & |
pos |
|
) |
| |
Create token with given type and value.
Definition at line 123 of file Parse.cc.
◆ column()
unsigned senf::console::Token::column |
( |
| ) |
const |
Column number of token in source.
◆ index()
unsigned senf::console::Token::index |
( |
| ) |
const |
Index (char count) of token in source.
◆ is()
bool senf::console::Token::is |
( |
unsigned |
tokens | ) |
const |
Check, whether tokens type matches tokens.
tokens is a bit-mask of token types to check.
◆ line()
unsigned senf::console::Token::line |
( |
| ) |
const |
Line number of token in source.
◆ operator!=()
bool senf::console::Token::operator!= |
( |
Token const & |
other | ) |
const |
◆ operator==()
bool senf::console::Token::operator== |
( |
Token const & |
other | ) |
const |
◆ type()
TokenType senf::console::Token::type |
( |
| ) |
const |
◆ value()
std::string const& senf::console::Token::value |
( |
| ) |
const |
String value of token.
This value is properly unquoted
◆ ArgumentGroupCloseToken()
Token ArgumentGroupCloseToken |
( |
| ) |
|
|
related |
Create a ArgumentGroupClose
[')'] token.
◆ ArgumentGroupOpenToken()
Token ArgumentGroupOpenToken |
( |
| ) |
|
|
related |
Create an ArgumentGroupOpen
['('] token.
◆ BasicStringToken()
Token BasicStringToken |
( |
std::string const & |
value | ) |
|
|
related |
Create a BasicString
token with the given value.
◆ CommandTerminatorToken()
Token CommandTerminatorToken |
( |
| ) |
|
|
related |
Create a CommandTerminator
[';'] token.
◆ DirectoryGroupCloseToken()
Token DirectoryGroupCloseToken |
( |
| ) |
|
|
related |
Create a DirectoryGroupClose
['}'] token.
◆ DirectoryGroupOpenToken()
Token DirectoryGroupOpenToken |
( |
| ) |
|
|
related |
Create a DirectoryGroupOpen
['{'] token.
◆ HexStringToken()
Token HexStringToken |
( |
std::string const & |
value | ) |
|
|
related |
Create a HexString
token with the given value.
◆ NoneToken()
◆ OtherPunctuationToken()
Token OtherPunctuationToken |
( |
std::string const & |
value | ) |
|
|
related |
Create a OtherPunctuation
['=', ','] token with the given value.
◆ PathSeparatorToken()
Token PathSeparatorToken |
( |
| ) |
|
|
related |
Create a PathSeparator
['/'] token.
◆ WordToken()
Token WordToken |
( |
std::string const & |
value | ) |
|
|
related |
Create a Word
token with the given value.
The documentation for this class was generated from the following files: