Represents a token.
More...
#include <token.h>
|
|
| Token ()=delete |
| | Deleted default constructor.
|
| |
| | Token (TokenType type, const Lexeme &lexeme, size_type line, size_type column) noexcept |
| | Construct a Token object from the given type, lexeme, line, and column.
|
| |
|
| Token (Token &&) noexcept=default |
| | Move-construct a Token object.
|
| |
|
Token & | operator= (Token &&) noexcept=default |
| | Move-assign a Token object.
|
| |
|
| Token (const Token &) noexcept=default |
| | Copy-construct a Token object.
|
| |
|
Token & | operator= (const Token &) noexcept=default |
| | Copy-assign a Token object.
|
| |
|
| ~Token () noexcept=default |
| | Destroy the Token object.
|
| |
| bool | operator== (const Token &other) const noexcept |
| | Equality operator for Token objects.
|
| |
| TokenType | type () const noexcept |
| | Get the type of the token.
|
| |
| Lexeme | lexeme () const noexcept |
| | Get the lexeme of the token.
|
| |
| size_type | line () const noexcept |
| | Get the line number of the token.
|
| |
| size_type | column () const noexcept |
| | Get the column number of the token.
|
| |
| std::string | str () const noexcept |
| | Get the string representation of the token.
|
| |
Represents a token.
Definition at line 81 of file token.h.
◆ size_type
| using vkdb::Token::size_type = uint64_t |
◆ Token()
| vkdb::Token::Token |
( |
TokenType | type, |
|
|
const Lexeme & | lexeme, |
|
|
Token::size_type | line, |
|
|
Token::size_type | column ) |
|
explicitnoexcept |
Construct a Token object from the given type, lexeme, line, and column.
- Parameters
-
| type | The type of the token. |
| lexeme | The lexeme of the token. |
| line | The line number of the token. |
| column | The column number of the token. |
Definition at line 4 of file token.cpp.
◆ column()
| Token::size_type vkdb::Token::column |
( |
| ) |
const |
|
nodiscardnoexcept |
Get the column number of the token.
- Returns
- size_type The column number of the token.
Definition at line 34 of file token.cpp.
◆ lexeme()
| Lexeme vkdb::Token::lexeme |
( |
| ) |
const |
|
nodiscardnoexcept |
Get the lexeme of the token.
- Returns
- Lexeme The lexeme of the token.
Definition at line 26 of file token.cpp.
◆ line()
| Token::size_type vkdb::Token::line |
( |
| ) |
const |
|
nodiscardnoexcept |
Get the line number of the token.
- Returns
- size_type The line number of the token.
Definition at line 30 of file token.cpp.
◆ operator==()
| bool vkdb::Token::operator== |
( |
const Token & | other | ) |
const |
|
nodiscardnoexcept |
Equality operator for Token objects.
- Parameters
-
| other | The other Token object. |
- Returns
- true if the Token objects are equal.
-
false if the Token objects are not equal.
Definition at line 15 of file token.cpp.
◆ str()
| std::string vkdb::Token::str |
( |
| ) |
const |
|
nodiscardnoexcept |
Get the string representation of the token.
- Returns
- std::string The string representation of the token.
Definition at line 38 of file token.cpp.
◆ type()
| TokenType vkdb::Token::type |
( |
| ) |
const |
|
nodiscardnoexcept |
Get the type of the token.
- Returns
- TokenType The type of the token.
Definition at line 22 of file token.cpp.
The documentation for this class was generated from the following files:
- /home/runner/work/vkdb/vkdb/include/query/vkdb/token.h
- /home/runner/work/vkdb/vkdb/src/query/token.cpp