From efd3f420b50690dfd780e52e047731e039afeead Mon Sep 17 00:00:00 2001 From: "Tristan B. Velloza Kildaire" Date: Wed, 17 Apr 2024 12:24:56 +0200 Subject: [PATCH] Parser - Now uses new comment method --- source/tlang/compiler/parsing/core.d | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/source/tlang/compiler/parsing/core.d b/source/tlang/compiler/parsing/core.d index 4ff02b5e..7c41cb45 100644 --- a/source/tlang/compiler/parsing/core.d +++ b/source/tlang/compiler/parsing/core.d @@ -154,6 +154,8 @@ public final class Parser private bool getAssociatedComment(ref Comment comment) { + // TODO: null check? on this.prevToken + // If the previous token was a comment if ( @@ -488,9 +490,9 @@ public final class Parser // TODO: Check if we should pop anything off of the comment // stack here Comment potComment; - if(hasCommentsOnStack()) + if(getAssociatedComment(potComment)) { - potComment = popComment(); + DEBUG(format("Found associated comment: %s", potComment)); } scope(exit)