-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathparser.h
More file actions
25 lines (21 loc) · 513 Bytes
/
Copy pathparser.h
File metadata and controls
25 lines (21 loc) · 513 Bytes
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
#ifndef PARSER_H
#define PARSER_H
#include "ast.h"
#include "common.h"
#include "lexer.h"
typedef struct {
Lexer *lexer;
Token current_token;
Token previous_token;
Token next_token;
Token lookahead2_token;
bool panic_mode;
bool had_error;
char *error_msg;
int error_line;
int error_col;
} Parser;
void parser_init(Parser *parser, Lexer *lexer);
Stmt *parser_parse(Parser *parser);
int digit_value_for_base(int base, char c);
#endif // PARSER_H