From e359a918431f04ce75e2264b03aeba1598ab4794 Mon Sep 17 00:00:00 2001 From: mettelarsen Date: Thu, 11 Apr 2024 13:22:07 +0200 Subject: [PATCH] Changed to typeTable.None in TableVisitor --- .../Compiler/Typechecker/SctTableVisitor.cs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/SocietalConstructionTool/Compiler/Typechecker/SctTableVisitor.cs b/SocietalConstructionTool/Compiler/Typechecker/SctTableVisitor.cs index 3c708bfc..a879f526 100644 --- a/SocietalConstructionTool/Compiler/Typechecker/SctTableVisitor.cs +++ b/SocietalConstructionTool/Compiler/Typechecker/SctTableVisitor.cs @@ -25,7 +25,7 @@ public override SctType VisitStart([NotNull] SctParser.StartContext context) { _errors.Add(new CompilerError("Setup function must return void and take no arguments")); } - return TypeTable.Void; + return TypeTable.None; } public override SctType VisitClass_def([NotNull] SctParser.Class_defContext context) @@ -50,7 +50,7 @@ public override SctType VisitClass_def([NotNull] SctParser.Class_defContext cont _ = _ctableBuilder.FinishClass(); - return TypeTable.Void; + return TypeTable.None; } public override SctType VisitFunction([NotNull] SctParser.FunctionContext context) @@ -65,7 +65,7 @@ public override SctType VisitFunction([NotNull] SctParser.FunctionContext contex _errors.Add(new CompilerError($"ID {context.ID().GetText()} already exists", context.Start.Line, context.Start.Column)); } - return type; + return TypeTable.None; } public override SctType VisitType([NotNull] SctParser.TypeContext context) @@ -86,7 +86,7 @@ public override SctType VisitState([NotNull] SctParser.StateContext context) { _errors.Add(new CompilerError($"ID {context.ID().GetText()} already exists", context.Start.Line, context.Start.Column)); } - return TypeTable.Void; + return TypeTable.None; } public override SctType VisitDecorator([NotNull] SctParser.DecoratorContext context) @@ -95,7 +95,7 @@ public override SctType VisitDecorator([NotNull] SctParser.DecoratorContext cont { _errors.Add(new CompilerError($"ID {context.ID().GetText()} already exists", context.Start.Line, context.Start.Column)); } - return TypeTable.Void; + return TypeTable.None; } } }