From 2cdc53e9b692207febeb85a65db596043b247544 Mon Sep 17 00:00:00 2001 From: "Tristan B. Kildaire" Date: Fri, 5 Mar 2021 11:58:51 +0200 Subject: [PATCH] Cleaned up debug prints for `parseIf` and `parseWhile` --- source/tlang/compiler/parser.d | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/source/tlang/compiler/parser.d b/source/tlang/compiler/parser.d index 334947a..7549d64 100644 --- a/source/tlang/compiler/parser.d +++ b/source/tlang/compiler/parser.d @@ -63,6 +63,8 @@ public final class Parser private void parseIf() { + gprintln("parseIf(): Enter", DebugType.WARNING); + /* Pop off the `if` */ nextToken(); @@ -83,11 +85,13 @@ public final class Parser expect(SymbolType.CCURLY, getCurrentToken()); nextToken(); - gprintln("parseIf(): PARSING OF IF STTAMENT BODY DONE"); + gprintln("parseIf(): Leave", DebugType.WARNING); } private void parseWhile() { + gprintln("parseWhile(): Enter", DebugType.WARNING); + /* Pop off the `while` */ nextToken(); @@ -108,7 +112,7 @@ public final class Parser expect(SymbolType.CCURLY, getCurrentToken()); nextToken(); - gprintln("parseWhile(): PARSING OF WHILE STTAMENT BODY DONE"); + gprintln("parseWhile(): Leave", DebugType.WARNING); } @@ -241,6 +245,8 @@ public final class Parser /** * Parses an expression * + * TODO: + * * 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.