Prepended file names with "toy_"

This commit is contained in:
2023-01-23 21:45:52 +00:00
parent 59b0d15915
commit 047ccc5f16
29 changed files with 0 additions and 0 deletions

20
source/toy_parser.h Normal file
View File

@@ -0,0 +1,20 @@
#pragma once
#include "toy_common.h"
#include "lexer.h"
#include "ast_node.h"
//DOCS: parsers are bound to a lexer, and turn the outputted tokens into AST nodes
typedef struct {
Lexer* lexer;
bool error; //I've had an error
bool panic; //I am processing an error
//track the last two outputs from the lexer
Token current;
Token previous;
} Parser;
TOY_API void initParser(Parser* parser, Lexer* lexer);
TOY_API void freeParser(Parser* parser);
TOY_API ASTNode* scanParser(Parser* parser);