omg embarrassing

This commit is contained in:
Adam D. Ruppe 2025-04-22 21:13:59 -04:00
parent f13e0f6ebd
commit 8f39049428
1 changed files with 8 additions and 2 deletions

View File

@ -2968,7 +2968,7 @@ Expression parseAddend(MyTokenStreamHere)(ref MyTokenStreamHere tokens) {
case "<": case "<":
case ">": case ">":
tokens.popFront(); tokens.popFront();
e1 = new BinaryExpression(peek.str, e1, parseAddend(tokens)); e1 = new BinaryExpression(peek.str, e1, parseFactor(tokens));
break; break;
case "+=": case "+=":
case "-=": case "-=":
@ -3615,7 +3615,6 @@ Expression parseStatement(MyTokenStreamHere)(ref MyTokenStreamHere tokens, strin
// FIXME someday this should work, my parser is so bad // FIXME someday this should work, my parser is so bad
// until then put parens around your == stuff. // until then put parens around your == stuff.
version(none)
unittest { unittest {
interpret(q{ interpret(q{
var a = 5; var a = 5;
@ -3632,6 +3631,13 @@ unittest {
}); });
} }
unittest {
interpret(q{
var a = 10 - 5 - 5;
assert(a == 0);
});
}
struct CompoundStatementRange(MyTokenStreamHere) { struct CompoundStatementRange(MyTokenStreamHere) {
// FIXME: if MyTokenStreamHere is not a class, this fails! // FIXME: if MyTokenStreamHere is not a class, this fails!