diff --git a/source/tlang/compiler/typecheck/core.d b/source/tlang/compiler/typecheck/core.d index 0471724..720e271 100644 --- a/source/tlang/compiler/typecheck/core.d +++ b/source/tlang/compiler/typecheck/core.d @@ -59,9 +59,21 @@ public final class TypeChecker /* TODO: Idk, maybe change */ /* TODO: Just using for `checkDefinitionTypes` */ - private void checkDefinitionTypes(Container c) + private bool isBuiltInType(string type) + { + /* TODO: Implemtn me */ + return false; + } + + private bool isClassType() + { + + } + + /* TODO: I don't like above, let's make shit implement Type */ + + private void checkVariableDeclarationTypes(Container c) { - /* Check variable declarations */ Variable[] variables; foreach (Statement statement; c.getStatements()) @@ -72,6 +84,21 @@ public final class TypeChecker } } + /* Attempt to resolve the types of the variables */ + foreach(Variable variable; variables) + { + /* Variable's type */ + string type = variable.getType(); + + + } + } + + private void checkDefinitionTypes(Container c) + { + /* Check variable declarations */ + checkVariableDeclarationTypes(c); + /* Check function definitions */ Function[] functions;