#ifndef SK_PARSER_H #define SK_PARSER_H #include "commons.h" #include "node.h" #include "lexer.h" struct parser { struct lexer lexer; }; void parser_init(struct parser* self, char const* source); void parser_free(struct parser* self); struct node* parser_try(struct parser* self, struct node* (*rule)(struct parser*)); struct node* parser_try_parse(struct parser* self); struct node* parser_try_root(struct parser* self); struct node* parser_try_expr(struct parser* self); struct node* parser_try_import(struct parser* self); struct node* parser_try_fun_decl(struct parser* self); struct node* parser_try_block(struct parser* self); struct node* parser_try_inner_block(struct parser* self); struct node* parser_try_if(struct parser* self); struct node* parser_try_assign(struct parser* self); struct node* parser_try_var_decl(struct parser* self); struct node* parser_try_const_decl(struct parser* self); struct node* parser_try_assert(struct parser* self); struct node* parser_try_or(struct parser* self); struct node* parser_try_and(struct parser* self); struct node* parser_try_eq(struct parser* self); struct node* parser_try_cmp(struct parser* self); struct node* parser_try_term(struct parser* self); struct node* parser_try_factor(struct parser* self); struct node* parser_try_usub(struct parser* self); struct node* parser_try_not(struct parser* self); struct node* parser_try_pow(struct parser* self); struct node* parser_try_literal(struct parser* self); struct node* parser_try_mod_access(struct parser* self); struct node* parser_try_module(struct parser* self); struct node* parser_try_call(struct parser* self); struct node* parser_try_args(struct parser* self); struct node* parser_try_fun(struct parser* self); struct node* parser_try_params(struct parser* self); struct node* parser_try_builtin(struct parser* self); #endif