The Parser class that converts tokens into an AST.
More...
#include <parser.h>
The Parser class that converts tokens into an AST.
◆ Parser() [1/2]
Constructs a Parser without tokens.
◆ Parser() [2/2]
| Parser::Parser |
( |
std::vector< Token > | tokens | ) |
|
|
explicit |
Constructs a Parser with a given vector of tokens.
◆ parse()
Parses the tokens into an AST.
- Returns
- The root of the AST.
◆ printAST()
| void Parser::printAST |
( |
const std::unique_ptr< ModuleNode > & | node, |
|
|
int | indent = 0 ) |
Prints the AST in a human-readable format.
- Parameters
-
| node | The root of the AST. |
| indent | The current indentation level (used for formatting) (not working currently). |
◆ setTokens()
| void picceler::Parser::setTokens |
( |
std::vector< Token > | tokens | ) |
|
|
inline |
The documentation for this class was generated from the following files: