Cleanup.
This commit is contained in:
parent
6997b75403
commit
7c9aa8fe89
1 changed files with 16 additions and 47 deletions
|
@ -8,9 +8,7 @@ namespace arookas {
|
||||||
|
|
||||||
}
|
}
|
||||||
public sunCompilerException(string format, params object[] args)
|
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
|
// exceptions that have a location in the source
|
||||||
|
@ -21,9 +19,7 @@ namespace arookas {
|
||||||
|
|
||||||
}
|
}
|
||||||
public sunSourceException(string format, params object[] args)
|
public sunSourceException(string format, params object[] args)
|
||||||
: base(format, args) {
|
: base(format, args) { }
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public class sunImportException : sunCompilerException {
|
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 override string Message { get { return String.Format("Redeclared builtin '{0}'.", Node.Builtin.Value); } }
|
||||||
|
|
||||||
public sunRedeclaredBuiltinException(sunBuiltinDeclaration node)
|
public sunRedeclaredBuiltinException(sunBuiltinDeclaration node)
|
||||||
: base(node) {
|
: base(node) { }
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
class sunUndefinedFunctionException : sunNodeException<sunFunctionCall> {
|
class sunUndefinedFunctionException : sunNodeException<sunFunctionCall> {
|
||||||
public override string Message { get { return String.Format("Undefined function or builtin '{0}'.", Node.Function.Value); } }
|
public override string Message { get { return String.Format("Undefined function or builtin '{0}'.", Node.Function.Value); } }
|
||||||
|
|
||||||
public sunUndefinedFunctionException(sunFunctionCall node)
|
public sunUndefinedFunctionException(sunFunctionCall node)
|
||||||
: base(node) {
|
: base(node) { }
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
class sunRedefinedFunctionException : sunNodeException<sunFunctionDefinition> {
|
class sunRedefinedFunctionException : sunNodeException<sunFunctionDefinition> {
|
||||||
public override string Message { get { return String.Format("Redefined function '{0}'.", Node.Function.Value); } }
|
public override string Message { get { return String.Format("Redefined function '{0}'.", Node.Function.Value); } }
|
||||||
|
|
||||||
public sunRedefinedFunctionException(sunFunctionDefinition node)
|
public sunRedefinedFunctionException(sunFunctionDefinition node)
|
||||||
: base(node) {
|
: base(node) { }
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
class sunUndeclaredVariableException : sunNodeException<sunIdentifier> {
|
class sunUndeclaredVariableException : sunNodeException<sunIdentifier> {
|
||||||
public override string Message { get { return String.Format("Undeclared variable '{0}'.", Node.Value); } }
|
public override string Message { get { return String.Format("Undeclared variable '{0}'.", Node.Value); } }
|
||||||
|
|
||||||
public sunUndeclaredVariableException(sunIdentifier node)
|
public sunUndeclaredVariableException(sunIdentifier node)
|
||||||
: base(node) {
|
: base(node) { }
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
class sunRedeclaredVariableException : sunNodeException<sunIdentifier> {
|
class sunRedeclaredVariableException : sunNodeException<sunIdentifier> {
|
||||||
public override string Message { get { return String.Format("Redeclared variable '{0}'.", Node.Value); } }
|
public override string Message { get { return String.Format("Redeclared variable '{0}'.", Node.Value); } }
|
||||||
|
|
||||||
public sunRedeclaredVariableException(sunIdentifier node)
|
public sunRedeclaredVariableException(sunIdentifier node)
|
||||||
: base(node) {
|
: base(node) { }
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
class sunAssignConstantException : sunNodeException<sunIdentifier> {
|
class sunAssignConstantException : sunNodeException<sunIdentifier> {
|
||||||
public override string Message { get { return String.Format("Constant '{0}' is read-only.", Node.Value); } }
|
public override string Message { get { return String.Format("Constant '{0}' is read-only.", Node.Value); } }
|
||||||
|
|
||||||
public sunAssignConstantException(sunIdentifier node)
|
public sunAssignConstantException(sunIdentifier node)
|
||||||
: base(node) {
|
: base(node) { }
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
class sunRedeclaredParameterException : sunNodeException<sunIdentifier> {
|
class sunRedeclaredParameterException : sunNodeException<sunIdentifier> {
|
||||||
public override string Message { get { return String.Format("Redeclared parameter '{0}'.", Node.Value); } }
|
public override string Message { get { return String.Format("Redeclared parameter '{0}'.", Node.Value); } }
|
||||||
|
|
||||||
public sunRedeclaredParameterException(sunIdentifier node)
|
public sunRedeclaredParameterException(sunIdentifier node)
|
||||||
: base(node) {
|
: base(node) { }
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
class sunVariadicFunctionException : sunNodeException<sunFunctionDefinition> {
|
class sunVariadicFunctionException : sunNodeException<sunFunctionDefinition> {
|
||||||
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 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)
|
public sunVariadicFunctionException(sunFunctionDefinition node)
|
||||||
: base(node) {
|
: base(node) { }
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
class sunEscapeSequenceException : sunNodeException<sunStringLiteral> {
|
class sunEscapeSequenceException : sunNodeException<sunStringLiteral> {
|
||||||
public override string Message { get { return String.Format("Bad escape sequence in string."); } }
|
public override string Message { get { return String.Format("Bad escape sequence in string."); } }
|
||||||
|
|
||||||
public sunEscapeSequenceException(sunStringLiteral node)
|
public sunEscapeSequenceException(sunStringLiteral node)
|
||||||
: base(node) {
|
: base(node) { }
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
class sunVariadicParameterListException : sunNodeException<sunParameterList> {
|
class sunVariadicParameterListException : sunNodeException<sunParameterList> {
|
||||||
public override string Message { get { return String.Format("Bad variadic parameter list."); } }
|
public override string Message { get { return String.Format("Bad variadic parameter list."); } }
|
||||||
|
|
||||||
public sunVariadicParameterListException(sunParameterList node)
|
public sunVariadicParameterListException(sunParameterList node)
|
||||||
: base(node) {
|
: base(node) { }
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
class sunArgumentCountException : sunNodeException<sunFunctionCall> {
|
class sunArgumentCountException : sunNodeException<sunFunctionCall> {
|
||||||
public sunCallableSymbol CalledSymbol { get; private set; }
|
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 override string Message { get { return String.Format("Invalid identifier '{0}'.", Node.Value); } }
|
||||||
|
|
||||||
public sunIdentifierException(sunIdentifier node)
|
public sunIdentifierException(sunIdentifier node)
|
||||||
: base(node) {
|
: base(node) { }
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
class sunMissingImportException : sunNodeException<sunImport> {
|
class sunMissingImportException : sunNodeException<sunImport> {
|
||||||
public override string Message { get { return String.Format("Could not find import file '{0}'.", Node.ImportFile.Value); } }
|
public override string Message { get { return String.Format("Could not find import file '{0}'.", Node.ImportFile.Value); } }
|
||||||
|
|
||||||
public sunMissingImportException(sunImport node)
|
public sunMissingImportException(sunImport node)
|
||||||
: base(node) {
|
: base(node) { }
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
class sunBreakException : sunNodeException<sunBreak> {
|
class sunBreakException : sunNodeException<sunBreak> {
|
||||||
public override string Message { get { return "Break statements must be placed within a loop statement."; } }
|
public override string Message { get { return "Break statements must be placed within a loop statement."; } }
|
||||||
|
|
||||||
public sunBreakException(sunBreak node)
|
public sunBreakException(sunBreak node)
|
||||||
: base(node) {
|
: base(node) { }
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
class sunContinueException : sunNodeException<sunContinue> {
|
class sunContinueException : sunNodeException<sunContinue> {
|
||||||
public override string Message { get { return "Continue statements must be placed within a loop statement."; } }
|
public override string Message { get { return "Continue statements must be placed within a loop statement."; } }
|
||||||
|
|
||||||
public sunContinueException(sunContinue node)
|
public sunContinueException(sunContinue node)
|
||||||
: base(node) {
|
: base(node) { }
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue