blob: f0ea0f73a899b8bcaafad2c47507a68e7161f687 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
#ifndef SKHD_PARSE_H
#define SKHD_PARSE_H
#include "tokenize.h"
#include <stdbool.h>
struct parser
{
struct token previous_token;
struct token current_token;
struct tokenizer tokenizer;
bool error;
};
struct hotkey *parse_config(struct parser *parser);
struct token parser_peek(struct parser *parser);
struct token parser_previous(struct parser *parser);
bool parser_eof(struct parser *parser);
struct token parser_advance(struct parser *parser);
bool parser_check(struct parser *parser, enum token_type type);
bool parser_match(struct parser *parser, enum token_type type);
bool parser_init(struct parser *parser, char *file);
void parser_destroy(struct parser *parser);
#endif
|