From 6edee006ad5f4369b2e439d84072d4a288bacf8f Mon Sep 17 00:00:00 2001 From: arookas Date: Sun, 13 Dec 2015 00:57:21 -0500 Subject: [PATCH] Renamed 'sunScriptException' to 'sunSourceException'. --- frontend/main.cs | 4 ++-- readme.md | 2 +- ssc/exceptions.cs | 10 +++++----- 3 files changed, 8 insertions(+), 8 deletions(-) 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; } }