21 lines
412 B
C
Raw Normal View History

2026-01-04 00:04:48 +01:00
/* retoor <retoor@molodetz.nl> */
2026-01-04 01:58:43 +01:00
#ifndef LOREX_PARSER_H
#define LOREX_PARSER_H
2026-01-04 00:04:48 +01:00
#include "ast.h"
#include "lexer.h"
2026-01-04 01:58:43 +01:00
#include "lorex.h"
2026-01-04 00:04:48 +01:00
typedef struct {
lexer_t lexer;
token_t current;
2026-01-04 01:58:43 +01:00
lorex_error_t error;
2026-01-04 00:04:48 +01:00
int group_count;
} parser_t;
void parser_init(parser_t *parser, const char *pattern);
ast_node_t *parser_parse(parser_t *parser);
2026-01-04 01:58:43 +01:00
lorex_error_t parser_get_error(parser_t *parser);
2026-01-04 00:04:48 +01:00
#endif