diff --git a/source/tlang/compiler/parsing/core.d b/source/tlang/compiler/parsing/core.d index 16c0a29..781b8f5 100644 --- a/source/tlang/compiler/parsing/core.d +++ b/source/tlang/compiler/parsing/core.d @@ -314,6 +314,31 @@ public final class Parser nextToken(); /* TODO: Here we will do a while loop */ + expect(SymbolType.OCURLY, getCurrentToken()); + nextToken(); + + while(true) + { + /* Get current token */ + SymbolType symbolType = getSymbolType(getCurrentToken()); + + /* If closing brace then exit */ + if(symbolType == SymbolType.CCURLY) + { + break; + } + + /* TODO: Only allow variables here */ + /* TODO: Only allowe VariableDeclarations (maybe assignments idk) */ + /* TODO: Might, do what d does and allow function */ + /* TODO: Which is just a codegen trick and implicit thing really */ + /* TODO: I mean isn't OOP too lmao */ + + + } + + /* Expect closing brace (sanity) */ + expect(SymbolType.CCURLY, getCurrentToken()); gprintln("parseStruct(): Leave", DebugType.WARNING); diff --git a/source/tlang/testing/basic1.t b/source/tlang/testing/basic1.t index a85aa5b..efcf4ad 100644 --- a/source/tlang/testing/basic1.t +++ b/source/tlang/testing/basic1.t @@ -30,6 +30,11 @@ class kl } +struct structTest +{ + +} + class Shekshi { class Shekshi1