diff --git a/frontend/main.cs b/frontend/main.cs index 95f6209..eb5ac36 100644 --- a/frontend/main.cs +++ b/frontend/main.cs @@ -35,9 +35,9 @@ namespace arookas } else { - if (results.Error is sunScriptException) + if (results.Error is sunSourceException) { - var error = results.Error as sunScriptException; + var error = results.Error as sunSourceException; Error(" in file \"{0}\"\n at line {1}, col {2}\n\n{3}{4}", error.Location.File, error.Location.Line, error.Location.Column, GetErrorPreview(error.Location), error.Message); exitCode = 1; } diff --git a/readme.md b/readme.md index 8f73b9d..9508677 100644 --- a/readme.md +++ b/readme.md @@ -35,7 +35,7 @@ Use the various properties on this type to gather the information of the compila |`FunctionCount`|The total number of function symbols created.| |`VariableCount`|The total number of global-scope variable symbols created.| -If the error is of the type `sunScriptException`, you can cast and retrieve the script name, line, and column of the error. +If the error is of the type `sunSourceException`, you can cast and retrieve the script name, line, and column of the error. ## Compiling diff --git a/ssc/exceptions.cs b/ssc/exceptions.cs index ec05c86..8ee776a 100644 --- a/ssc/exceptions.cs +++ b/ssc/exceptions.cs @@ -18,15 +18,15 @@ namespace arookas } // exceptions that have a location in the source - public abstract class sunScriptException : sunCompilerException + public abstract class sunSourceException : sunCompilerException { public abstract sunSourceLocation Location { get; } - public sunScriptException() + public sunSourceException() { } - public sunScriptException(string format, params object[] args) + public sunSourceException(string format, params object[] args) : base(format, args) { @@ -55,7 +55,7 @@ namespace arookas } // wrapper around Grammatica exceptions - class sunParserException : sunScriptException + class sunParserException : sunSourceException { string file; @@ -79,7 +79,7 @@ namespace arookas } // node exceptions - abstract class sunNodeException : sunScriptException where TNode : sunNode + abstract class sunNodeException : sunSourceException where TNode : sunNode { public TNode Node { get; private set; } public override sunSourceLocation Location { get { return Node.Location; } }