From f00126dc2dfc9e23aa50227f02ee9adbe1efdfa6 Mon Sep 17 00:00:00 2001 From: Jeff Ames Date: Tue, 29 Sep 2009 08:32:59 +0900 Subject: Add copyright header. Formatting cleanup. --- OpenSim/Tools/Compiler/Program.cs | 36 ++++++++++++++++-------------------- 1 file changed, 16 insertions(+), 20 deletions(-) (limited to 'OpenSim/Tools/Compiler/Program.cs') diff --git a/OpenSim/Tools/Compiler/Program.cs b/OpenSim/Tools/Compiler/Program.cs index 9cd6bc8..b18e029 100644 --- a/OpenSim/Tools/Compiler/Program.cs +++ b/OpenSim/Tools/Compiler/Program.cs @@ -37,19 +37,19 @@ namespace OpenSim.Tools.LSL.Compiler class Program { private static Dictionary, KeyValuePair> m_positionMap; - private static CSharpCodeProvider CScodeProvider = new CSharpCodeProvider(); + private static CSharpCodeProvider CScodeProvider = new CSharpCodeProvider(); static void Main(string[] args) { - string source = null; + string source = null; - if(args.Length == 0) + if (args.Length == 0) { Console.WriteLine("No input file specified"); Environment.Exit(1); } - if(!File.Exists(args[0])) + if (!File.Exists(args[0])) { Console.WriteLine("Input file does not exist"); Environment.Exit(1); @@ -136,11 +136,7 @@ namespace OpenSim.Tools.LSL.Compiler string errtext = String.Empty; foreach (CompilerError CompErr in results.Errors) { - string severity = "Error"; - if ( CompErr.IsWarning ) - { - severity = "Warning"; - } + string severity = CompErr.IsWarning ? "Warning" : "Error"; KeyValuePair lslPos; @@ -153,8 +149,8 @@ namespace OpenSim.Tools.LSL.Compiler // The Second Life viewer's script editor begins // countingn lines and columns at 0, so we subtract 1. errtext += String.Format("Line ({0},{1}): {4} {2}: {3}\n", - lslPos.Key - 1, lslPos.Value - 1, - CompErr.ErrorNumber, text, severity); + lslPos.Key - 1, lslPos.Value - 1, + CompErr.ErrorNumber, text, severity); } disp = "Completed with errors"; @@ -237,20 +233,20 @@ namespace OpenSim.Tools.LSL.Compiler private static string ReplaceTypes(string message) { message = message.Replace( - "OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLString", - "string"); + "OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLString", + "string"); message = message.Replace( - "OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLInteger", - "integer"); + "OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLInteger", + "integer"); message = message.Replace( - "OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLFloat", - "float"); + "OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLFloat", + "float"); message = message.Replace( - "OpenSim.Region.ScriptEngine.Shared.LSL_Types.list", - "list"); + "OpenSim.Region.ScriptEngine.Shared.LSL_Types.list", + "list"); return message; } @@ -263,7 +259,7 @@ namespace OpenSim.Tools.LSL.Compiler private class kvpSorter : IComparer> { public int Compare(KeyValuePair a, - KeyValuePair b) + KeyValuePair b) { return a.Key.CompareTo(b.Key); } -- cgit v1.1