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

Remove CompileErrorException #1758

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

wixoaGit
Copy link
Member

@wixoaGit wixoaGit commented Apr 21, 2024

CompileErrorException has been removed, opting to use alternatives over throwing an exception for DM code errors. Since it was marked obsolete this reduces the C# warning count from 179 to 117.

There's a new DMExpression called BadExpression that should be used anytime there was an error while building a DMExpression. The Null DMExpression was often used for this, but now we have something that can differentiate null from an error.

DMExpression code was also cleaned up. It now uses file-scoped namespaces, primary constructors, and are all marked internal.

Also fix a bunch of code style notices
# Conflicts:
#	DMCompiler/DM/Builders/DMObjectBuilder.cs
#	DMCompiler/DM/Builders/DMProcBuilder.cs
#	DMCompiler/DM/Expressions/Binary.cs
#	DMCompiler/DM/Expressions/Builtins.cs
#	DMCompiler/DM/Expressions/Constant.cs
#	DMCompiler/DM/Expressions/Dereference.cs
#	DMCompiler/DM/Expressions/LValue.cs
#	DMCompiler/DM/Expressions/Procs.cs
@boring-cyborg boring-cyborg bot added the Compiler Involves the OpenDream compiler label Apr 21, 2024
Copy link

This pull request has conflicts, please resolve those before we can evaluate the pull request.

…tion_removals

# Conflicts:
#	DMCompiler/DM/DMProc.cs
#	DMCompiler/DM/Expressions/Binary.cs
#	DMCompiler/DM/Expressions/Builtins.cs
#	DMCompiler/DM/Expressions/Constant.cs
Copy link

@github-advanced-security github-advanced-security bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

InspectCode found more than 20 potential problems in the proposed changes. Check the Files changed tab for more details.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Compiler Involves the OpenDream compiler size/XXL
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant