AST parser. More...
#include <parser.hpp>
Public Member Functions | |
error::Result< NodePtr<> > | parse (std::string_view input) |
Parse the input string. | |
error::Result< NodePtr<> > | next_program (ParserContext &ctx) |
Get the next program node. | |
error::Result< NodePtr<> > | next_statement (ParserContext &ctx) |
Get the next statement node. | |
error::Result< NodePtr<> > | next_expr (ParserContext &ctx) |
Get the next expression node. | |
error::Result< NodePtr<> > | next_prio_term (ParserContext &ctx, std::size_t prio) |
Get the next term node with the given priority. | |
error::Result< NodePtr<> > | next_if (ParserContext &ctx) |
Get the next if node. | |
error::Result< NodePtr<> > | next_assign (ParserContext &ctx) |
Get the next assignment node. | |
error::Result< NodePtr<> > | next_factor (ParserContext &ctx) |
Get the next factor node. | |
error::Result< NodePtr<> > | next_idref (ParserContext &ctx) |
Get the next identifier reference node (function or variable). | |
error::Result< NodePtr<> > | next_fdef (ParserContext &ctx) |
Get the next function definition node. | |
error::Result< NodePtr<> > | next_import (ParserContext &ctx) |
Get the next import node. | |
AST parser.
error::Result< NodePtr<> > tcalc::ast::Parser::next_assign | ( | ParserContext & | ctx | ) |
Get the next assignment node.
ctx | The parser context. |
error::Result< NodePtr<> > tcalc::ast::Parser::next_expr | ( | ParserContext & | ctx | ) |
Get the next expression node.
ctx | The parser context. |
error::Result< NodePtr<> > tcalc::ast::Parser::next_factor | ( | ParserContext & | ctx | ) |
Get the next factor node.
ctx | The parser context. |
error::Result< NodePtr<> > tcalc::ast::Parser::next_fdef | ( | ParserContext & | ctx | ) |
Get the next function definition node.
ctx | The parser context. |
error::Result< NodePtr<> > tcalc::ast::Parser::next_idref | ( | ParserContext & | ctx | ) |
Get the next identifier reference node (function or variable).
ctx | The parser context. |
error::Result< NodePtr<> > tcalc::ast::Parser::next_if | ( | ParserContext & | ctx | ) |
Get the next if node.
ctx | The parser context. |
error::Result< NodePtr<> > tcalc::ast::Parser::next_import | ( | ParserContext & | ctx | ) |
Get the next import node.
ctx | The parser context. |
error::Result< NodePtr<> > tcalc::ast::Parser::next_prio_term | ( | ParserContext & | ctx, |
std::size_t | prio | ||
) |
Get the next term node with the given priority.
ctx | The parser context. |
prio | The priority of the term. |
error::Result< NodePtr<> > tcalc::ast::Parser::next_program | ( | ParserContext & | ctx | ) |
Get the next program node.
ctx | The parser context. |
error::Result< NodePtr<> > tcalc::ast::Parser::next_statement | ( | ParserContext & | ctx | ) |
Get the next statement node.
ctx | The parser context. |
error::Result< NodePtr<> > tcalc::ast::Parser::parse | ( | std::string_view | input | ) |
Parse the input string.
input | The input string to parse. |