From 7c9aa8fe89d5a6c11cea4be03d51c8cbe011b8c8 Mon Sep 17 00:00:00 2001 From: arookas Date: Mon, 28 Dec 2015 14:17:09 -0500 Subject: [PATCH] Cleanup. --- ssc/exceptions.cs | 63 ++++++++++++----------------------------------- 1 file changed, 16 insertions(+), 47 deletions(-) diff --git a/ssc/exceptions.cs b/ssc/exceptions.cs index 538fe07..b2cc6a3 100644 --- a/ssc/exceptions.cs +++ b/ssc/exceptions.cs @@ -8,9 +8,7 @@ namespace arookas { } public sunCompilerException(string format, params object[] args) - : base(String.Format(format, args)) { - - } + : base(String.Format(format, args)) { } } // exceptions that have a location in the source @@ -21,9 +19,7 @@ namespace arookas { } public sunSourceException(string format, params object[] args) - : base(format, args) { - - } + : base(format, args) { } } public class sunImportException : sunCompilerException { @@ -92,81 +88,62 @@ namespace arookas { public override string Message { get { return String.Format("Redeclared builtin '{0}'.", Node.Builtin.Value); } } public sunRedeclaredBuiltinException(sunBuiltinDeclaration node) - : base(node) { - - } + : base(node) { } } class sunUndefinedFunctionException : sunNodeException { public override string Message { get { return String.Format("Undefined function or builtin '{0}'.", Node.Function.Value); } } public sunUndefinedFunctionException(sunFunctionCall node) - : base(node) { - - } + : base(node) { } } class sunRedefinedFunctionException : sunNodeException { public override string Message { get { return String.Format("Redefined function '{0}'.", Node.Function.Value); } } public sunRedefinedFunctionException(sunFunctionDefinition node) - : base(node) { - - } + : base(node) { } } class sunUndeclaredVariableException : sunNodeException { public override string Message { get { return String.Format("Undeclared variable '{0}'.", Node.Value); } } public sunUndeclaredVariableException(sunIdentifier node) - : base(node) { - - } + : base(node) { } } class sunRedeclaredVariableException : sunNodeException { public override string Message { get { return String.Format("Redeclared variable '{0}'.", Node.Value); } } public sunRedeclaredVariableException(sunIdentifier node) - : base(node) { - - } + : base(node) { } } class sunAssignConstantException : sunNodeException { public override string Message { get { return String.Format("Constant '{0}' is read-only.", Node.Value); } } public sunAssignConstantException(sunIdentifier node) - : base(node) { + : base(node) { } - } } class sunRedeclaredParameterException : sunNodeException { public override string Message { get { return String.Format("Redeclared parameter '{0}'.", Node.Value); } } public sunRedeclaredParameterException(sunIdentifier node) - : base(node) { - - } + : base(node) { } } class sunVariadicFunctionException : sunNodeException { public override string Message { get { return String.Format("Function '{0}' is defined as a variadic function (only builtins may be variadic).", Node.Function.Value); } } public sunVariadicFunctionException(sunFunctionDefinition node) - : base(node) { - - } + : base(node) { } } class sunEscapeSequenceException : sunNodeException { public override string Message { get { return String.Format("Bad escape sequence in string."); } } public sunEscapeSequenceException(sunStringLiteral node) - : base(node) { - - } + : base(node) { } } class sunVariadicParameterListException : sunNodeException { public override string Message { get { return String.Format("Bad variadic parameter list."); } } public sunVariadicParameterListException(sunParameterList node) - : base(node) { - - } + : base(node) { } } class sunArgumentCountException : sunNodeException { public sunCallableSymbol CalledSymbol { get; private set; } @@ -202,32 +179,24 @@ namespace arookas { public override string Message { get { return String.Format("Invalid identifier '{0}'.", Node.Value); } } public sunIdentifierException(sunIdentifier node) - : base(node) { - - } + : base(node) { } } class sunMissingImportException : sunNodeException { public override string Message { get { return String.Format("Could not find import file '{0}'.", Node.ImportFile.Value); } } public sunMissingImportException(sunImport node) - : base(node) { - - } + : base(node) { } } class sunBreakException : sunNodeException { public override string Message { get { return "Break statements must be placed within a loop statement."; } } public sunBreakException(sunBreak node) - : base(node) { - - } + : base(node) { } } class sunContinueException : sunNodeException { public override string Message { get { return "Continue statements must be placed within a loop statement."; } } public sunContinueException(sunContinue node) - : base(node) { - - } + : base(node) { } } }