diff --git a/source/tlang/compiler/parsing/core.d b/source/tlang/compiler/parsing/core.d index a4c3cc6..71d693f 100644 --- a/source/tlang/compiler/parsing/core.d +++ b/source/tlang/compiler/parsing/core.d @@ -1116,6 +1116,14 @@ public final class Parser /* Add the class definition to the program */ modulle.addStatement(clazz); } + /* If it is a struct definition */ + else if(symbol == SymbolType.STRUCT) + { + Struct ztruct = parseStruct(); + + /* Add the struct definition to the program */ + modulle.addStatement(ztruct); + } else { expect("parse(): Unknown '" ~ tok.getToken() ~ "'"); diff --git a/source/tlang/testing/basic1.t b/source/tlang/testing/basic1.t index 6c752e4..5a9b366 100644 --- a/source/tlang/testing/basic1.t +++ b/source/tlang/testing/basic1.t @@ -30,7 +30,10 @@ class kl } +struct structTest +{ +} class Shekshi {