Parser for vq.
More...
#include <parser.h>
|
|
| Parser ()=delete |
| | Deleted default constructor.
|
| |
| | Parser (const std::vector< Token > &tokens, error_callback callback=[](const Token &, const std::string &) {}) noexcept |
| | Construct a Parser with a list of tokens and an optional error callback.
|
| |
| std::optional< Expr > | parse () noexcept |
| | Parses the tokens into an expression.
|
| |
Parser for vq.
Definition at line 22 of file parser.h.
◆ error_callback
| using vkdb::Parser::error_callback = std::function<void(const Token&, const std::string&)> |
◆ size_type
| using vkdb::Parser::size_type = uint64_t |
◆ Parser()
| vkdb::Parser::Parser |
( |
const std::vector< Token > & | tokens, |
|
|
error_callback | callback = [](const Token&, const std::string&) {} ) |
|
noexcept |
Construct a Parser with a list of tokens and an optional error callback.
Defaults the error callback to an empty lambda.
- Parameters
-
| tokens | The list of tokens to parse. |
| callback | The error callback function. |
Definition at line 5 of file parser.cpp.
◆ parse()
| std::optional< Expr > vkdb::Parser::parse |
( |
| ) |
|
|
nodiscardnoexcept |
Parses the tokens into an expression.
- Returns
- An optional expression if parsing is successful.
Definition at line 11 of file parser.cpp.
The documentation for this class was generated from the following files:
- /home/runner/work/vkdb/vkdb/include/query/vkdb/parser.h
- /home/runner/work/vkdb/vkdb/src/query/parser.cpp