From f547a1127d9e4609bb04633268ed9b9011bed99c Mon Sep 17 00:00:00 2001 From: "Tristan B. Kildaire" Date: Fri, 5 Mar 2021 11:46:51 +0200 Subject: [PATCH] Added TODO for `parseExpression` - found possible way to implement expression parsing correctly --- source/tlang/compiler/parser.d | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/source/tlang/compiler/parser.d b/source/tlang/compiler/parser.d index b6c921f7..334947a6 100644 --- a/source/tlang/compiler/parser.d +++ b/source/tlang/compiler/parser.d @@ -238,6 +238,17 @@ public final class Parser } } + /** + * Parses an expression + * + * I think we need a loop here to move till we hit a terminator like `)` + * in the case of a condition's/function's argument expression or `;` in + * the case of a assignment's expression. + * + * This means we will be able to get the `+` token and process it + * We will also terminate on `;` or `)` and that means our `else` can be + * left to error out for unknowns then + */ private void parseExpression() { /* TODO: Implement expression parsing */