Wrote Toy_Lexer, Toy_Parser API

This commit is contained in:
2023-02-16 22:38:34 +11:00
committed by GitHub
parent 48dd1f9411
commit a70149440a
4 changed files with 94 additions and 3 deletions

10
c-api/toy_lexer_h.md Normal file
View File

@@ -0,0 +1,10 @@
# toy_lexer.h
This header defines the structure `Toy_Lexer`, which can be bound to a piece of source code, and used to tokenize it within a parser.
## Defined Functions
### void Toy_initLexer(Toy_Lexer* lexer, const char* source)
This function initializes a lexer, binding it to the `source` parameter; the lexer is now ready to be passed to the parser.