Add parser header
This commit is contained in:
+22
@@ -0,0 +1,22 @@
|
|||||||
|
#ifndef PARSER_H
|
||||||
|
#define PARSER_H
|
||||||
|
|
||||||
|
#include "ast.h"
|
||||||
|
#include "token.h"
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Parse a stream of tokens into a module.
|
||||||
|
*
|
||||||
|
* @param ts The TokenStream to read.
|
||||||
|
* @returns The parsed module.
|
||||||
|
*/
|
||||||
|
Module* parser_parse(TokenStream* ts);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Frees the parsed AST.
|
||||||
|
*
|
||||||
|
* @param module The AST return by parser_parse.
|
||||||
|
*/
|
||||||
|
void parser_free(Module* module);
|
||||||
|
|
||||||
|
#endif
|
||||||
Reference in New Issue
Block a user