mirror of
https://github.com/krgamestudios/Toy.git
synced 2026-04-15 14:54:07 +10:00
Renemed all variables to fit into a namespace
Basically, all Toy varaibles, functions, etc. are prepended with "Toy_", and macros are prepended with "TOY_". This is to reduce namespace pollution, which was an issue pointed out to be - blame @GyroVorbis. I've also bumped the minor version number - theoretically I should bump the major number, but I'm not quite ready for 1.0 yet.
This commit is contained in:
@@ -1,20 +1,20 @@
|
||||
#pragma once
|
||||
|
||||
#include "toy_common.h"
|
||||
#include "lexer.h"
|
||||
#include "ast_node.h"
|
||||
#include "toy_lexer.h"
|
||||
#include "toy_ast_node.h"
|
||||
|
||||
//DOCS: parsers are bound to a lexer, and turn the outputted tokens into AST nodes
|
||||
typedef struct {
|
||||
Lexer* lexer;
|
||||
Toy_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_Token current;
|
||||
Toy_Token previous;
|
||||
} Toy_Parser;
|
||||
|
||||
TOY_API void initParser(Parser* parser, Lexer* lexer);
|
||||
TOY_API void freeParser(Parser* parser);
|
||||
TOY_API ASTNode* scanParser(Parser* parser);
|
||||
TOY_API void Toy_initParser(Toy_Parser* parser, Toy_Lexer* lexer);
|
||||
TOY_API void Toy_freeParser(Toy_Parser* parser);
|
||||
TOY_API Toy_ASTNode* Toy_scanParser(Toy_Parser* parser);
|
||||
|
||||
Reference in New Issue
Block a user