WIP: I should make a `Type` interface
How tf do interfaces realistically work/are implementedentity_declaration_type_checking
parent
4bbdd78b45
commit
c5e744cfb8
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in New Issue