21 lines
295 B
C
21 lines
295 B
C
#ifndef _parse_h_
|
|
#define _parse_h_
|
|
|
|
#include "ast.h"
|
|
#include "state.h"
|
|
#include "lex.h"
|
|
|
|
typedef struct {
|
|
Compiler *cm;
|
|
LexState *lexer;
|
|
bool ok;
|
|
} ParserState;
|
|
|
|
ParserState *
|
|
parse_new(Compiler *cm, LexState *ls);
|
|
void
|
|
parse_destroy(ParserState *ps);
|
|
Ast *
|
|
parse(ParserState *ps);
|
|
|
|
#endif
|