Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changed to typeTable.None in TableVisitor #177

Merged
merged 1 commit into from
Apr 11, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions SocietalConstructionTool/Compiler/Typechecker/SctTableVisitor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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)
Expand All @@ -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)
Expand All @@ -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)
Expand All @@ -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;
}
}
}
Loading