From 13bfaaf91e3b16a548fb95b1e88e07be53ec4cd5 Mon Sep 17 00:00:00 2001 From: Kayne Ruse Date: Fri, 21 Jul 2023 02:59:55 +1000 Subject: [PATCH] Comment tweak --- c-api/toy_parser_h.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/c-api/toy_parser_h.md b/c-api/toy_parser_h.md index 2e03a5c..89dc123 100644 --- a/c-api/toy_parser_h.md +++ b/c-api/toy_parser_h.md @@ -6,17 +6,17 @@ This header defines the parser structure which, after being initialized with a l ```c //generate bytecode from a given string const unsigned char* Toy_compileString(const char* source, size_t* size) { - //declare the relevant instances + //declare the relevant instances Toy_Lexer lexer; Toy_Parser parser; Toy_Compiler compiler; - //initialize each of them + //initialize each of them Toy_initLexer(&lexer, source); Toy_initParser(&parser, &lexer); Toy_initCompiler(&compiler); - //when the parser returns NULL, it is finished + //when the parser returns NULL, it is finished Toy_ASTNode* node = Toy_scanParser(&parser); while(node != NULL) { //if the parser returns an error node, clean up and exit gracefully @@ -24,15 +24,15 @@ const unsigned char* Toy_compileString(const char* source, size_t* size) { Toy_freeASTNode(node); Toy_freeCompiler(&compiler); Toy_freeParser(&parser); - //no need to clean the lexer + //no need to clean the lexer return NULL; } - //write the node to the compiler + //write the node to the compiler Toy_writeCompiler(&compiler, node); Toy_freeASTNode(node); - //grab the next node + //grab the next node node = Toy_scanParser(&parser); }