mirror of
https://github.com/krgamestudios/Toy.git
synced 2026-04-15 14:54:07 +10:00
Implemented tests for Toy_Parser
The parser now correctly produces a workable AST. I think I'll skip over the optimizer, and begin on the compiler next session. The optimizer will act directly on the AST, but it isn't totally necessary. Other tools can also operate on the AST, such as for debugging - I'll have to ask what kinds are out there.
This commit is contained in:
@@ -82,3 +82,9 @@ void Toy_private_emitAstError(Toy_Bucket** bucket, Toy_Ast** handle) {
|
||||
|
||||
(*handle)->error.type = TOY_AST_ERROR;
|
||||
}
|
||||
|
||||
void Toy_private_emitAstEnd(Toy_Bucket** bucket, Toy_Ast** handle) {
|
||||
(*handle) = (Toy_Ast*)Toy_partBucket(bucket, sizeof(Toy_Ast));
|
||||
|
||||
(*handle)->error.type = TOY_AST_END;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user