From e663a0792b4a8a508ac03b6e0773994d25049ae4 Mon Sep 17 00:00:00 2001 From: "Tristan B. Kildaire" Date: Wed, 24 Mar 2021 21:50:06 +0200 Subject: [PATCH] In `parseBody()` after calling `parseClass` add the statement generated --- source/tlang/compiler/parser.d | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source/tlang/compiler/parser.d b/source/tlang/compiler/parser.d index 85bfbb1..5c7af7b 100644 --- a/source/tlang/compiler/parser.d +++ b/source/tlang/compiler/parser.d @@ -275,7 +275,8 @@ public final class Parser /* If it is a class definition */ else if (symbol == SymbolType.CLASS) { - parseClass(); + /* Parse the class and add its statements */ + statements ~= parseClass(); } /* Error out */ else