mirror of
https://github.com/krgamestudios/Toy.git
synced 2026-04-15 14:54:07 +10:00
Reworked the tests, read more
I've brought the tests up to scratch, except for compounds im the parser, because I'm too damn tired to do that over SSH. It looks like collections are right-recursive, whixh was unintended but still works just fine. I've also added the '--verbose' flag to the repl to control the debugging output. Several obscure bugs have been fixed, and comments have been tweaked. Mustfail tests are still needed, but that's a low priority. See #142. Fixed #151
This commit is contained in:
@@ -563,7 +563,7 @@ static Toy_AstFlag compound(Toy_Bucket** bucketHandle, Toy_Parser* parser, Toy_A
|
||||
advance(parser);
|
||||
|
||||
if (parser->previous.type == TOY_TOKEN_OPERATOR_COMMA) {
|
||||
parsePrecedence(bucketHandle, parser, rootHandle, PREC_GROUP);
|
||||
parsePrecedence(bucketHandle, parser, rootHandle, PREC_GROUP); //NOT +1, as compounds are right-recursive
|
||||
return TOY_AST_FLAG_COMPOUND_COLLECTION;
|
||||
}
|
||||
else if (parser->previous.type == TOY_TOKEN_OPERATOR_BRACKET_LEFT) {
|
||||
@@ -848,4 +848,4 @@ void Toy_resetParser(Toy_Parser* parser) {
|
||||
|
||||
void Toy_configureParser(Toy_Parser* parser, bool removeAssert) {
|
||||
parser->removeAssert = removeAssert;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user