diff options
author | Diva Canto | 2009-09-28 17:35:26 -0700 |
---|---|---|
committer | Diva Canto | 2009-09-28 17:35:26 -0700 |
commit | 51d9f7ebd4286709e75f6fcceff6fb75a4a83c46 (patch) | |
tree | 032929778f7dc07b560c75da262f285476a44450 /OpenSim/Tools | |
parent | Improved the Local grid connector to fetch data from the DB when it doesn't f... (diff) | |
parent | Convert DOS newlines to Unix newlines. (diff) | |
download | opensim-SC_OLD-51d9f7ebd4286709e75f6fcceff6fb75a4a83c46.zip opensim-SC_OLD-51d9f7ebd4286709e75f6fcceff6fb75a4a83c46.tar.gz opensim-SC_OLD-51d9f7ebd4286709e75f6fcceff6fb75a4a83c46.tar.bz2 opensim-SC_OLD-51d9f7ebd4286709e75f6fcceff6fb75a4a83c46.tar.xz |
Merge branch 'master' of ssh://diva@opensimulator.org/var/git/opensim
Diffstat (limited to 'OpenSim/Tools')
-rw-r--r-- | OpenSim/Tools/Compiler/Program.cs | 36 |
1 files changed, 16 insertions, 20 deletions
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 | |||
37 | class Program | 37 | class Program |
38 | { | 38 | { |
39 | private static Dictionary<KeyValuePair<int, int>, KeyValuePair<int, int>> m_positionMap; | 39 | private static Dictionary<KeyValuePair<int, int>, KeyValuePair<int, int>> m_positionMap; |
40 | private static CSharpCodeProvider CScodeProvider = new CSharpCodeProvider(); | 40 | private static CSharpCodeProvider CScodeProvider = new CSharpCodeProvider(); |
41 | 41 | ||
42 | static void Main(string[] args) | 42 | static void Main(string[] args) |
43 | { | 43 | { |
44 | string source = null; | 44 | string source = null; |
45 | 45 | ||
46 | if(args.Length == 0) | 46 | if (args.Length == 0) |
47 | { | 47 | { |
48 | Console.WriteLine("No input file specified"); | 48 | Console.WriteLine("No input file specified"); |
49 | Environment.Exit(1); | 49 | Environment.Exit(1); |
50 | } | 50 | } |
51 | 51 | ||
52 | if(!File.Exists(args[0])) | 52 | if (!File.Exists(args[0])) |
53 | { | 53 | { |
54 | Console.WriteLine("Input file does not exist"); | 54 | Console.WriteLine("Input file does not exist"); |
55 | Environment.Exit(1); | 55 | Environment.Exit(1); |
@@ -136,11 +136,7 @@ namespace OpenSim.Tools.LSL.Compiler | |||
136 | string errtext = String.Empty; | 136 | string errtext = String.Empty; |
137 | foreach (CompilerError CompErr in results.Errors) | 137 | foreach (CompilerError CompErr in results.Errors) |
138 | { | 138 | { |
139 | string severity = "Error"; | 139 | string severity = CompErr.IsWarning ? "Warning" : "Error"; |
140 | if ( CompErr.IsWarning ) | ||
141 | { | ||
142 | severity = "Warning"; | ||
143 | } | ||
144 | 140 | ||
145 | KeyValuePair<int, int> lslPos; | 141 | KeyValuePair<int, int> lslPos; |
146 | 142 | ||
@@ -153,8 +149,8 @@ namespace OpenSim.Tools.LSL.Compiler | |||
153 | // The Second Life viewer's script editor begins | 149 | // The Second Life viewer's script editor begins |
154 | // countingn lines and columns at 0, so we subtract 1. | 150 | // countingn lines and columns at 0, so we subtract 1. |
155 | errtext += String.Format("Line ({0},{1}): {4} {2}: {3}\n", | 151 | errtext += String.Format("Line ({0},{1}): {4} {2}: {3}\n", |
156 | lslPos.Key - 1, lslPos.Value - 1, | 152 | lslPos.Key - 1, lslPos.Value - 1, |
157 | CompErr.ErrorNumber, text, severity); | 153 | CompErr.ErrorNumber, text, severity); |
158 | } | 154 | } |
159 | 155 | ||
160 | disp = "Completed with errors"; | 156 | disp = "Completed with errors"; |
@@ -237,20 +233,20 @@ namespace OpenSim.Tools.LSL.Compiler | |||
237 | private static string ReplaceTypes(string message) | 233 | private static string ReplaceTypes(string message) |
238 | { | 234 | { |
239 | message = message.Replace( | 235 | message = message.Replace( |
240 | "OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLString", | 236 | "OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLString", |
241 | "string"); | 237 | "string"); |
242 | 238 | ||
243 | message = message.Replace( | 239 | message = message.Replace( |
244 | "OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLInteger", | 240 | "OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLInteger", |
245 | "integer"); | 241 | "integer"); |
246 | 242 | ||
247 | message = message.Replace( | 243 | message = message.Replace( |
248 | "OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLFloat", | 244 | "OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLFloat", |
249 | "float"); | 245 | "float"); |
250 | 246 | ||
251 | message = message.Replace( | 247 | message = message.Replace( |
252 | "OpenSim.Region.ScriptEngine.Shared.LSL_Types.list", | 248 | "OpenSim.Region.ScriptEngine.Shared.LSL_Types.list", |
253 | "list"); | 249 | "list"); |
254 | 250 | ||
255 | return message; | 251 | return message; |
256 | } | 252 | } |
@@ -263,7 +259,7 @@ namespace OpenSim.Tools.LSL.Compiler | |||
263 | private class kvpSorter : IComparer<KeyValuePair<int,int>> | 259 | private class kvpSorter : IComparer<KeyValuePair<int,int>> |
264 | { | 260 | { |
265 | public int Compare(KeyValuePair<int,int> a, | 261 | public int Compare(KeyValuePair<int,int> a, |
266 | KeyValuePair<int,int> b) | 262 | KeyValuePair<int,int> b) |
267 | { | 263 | { |
268 | return a.Key.CompareTo(b.Key); | 264 | return a.Key.CompareTo(b.Key); |
269 | } | 265 | } |