From bbabd68c7c69113d27e8e14b64d4d543ecce9ffc Mon Sep 17 00:00:00 2001 From: Charles Krinke Date: Thu, 5 Jun 2008 14:17:22 +0000 Subject: Mantis#1437. Patch 2 of 4. Thank you kindly, Melanie for: Corrects the XEngine's script startup semantics. Completes llRequestAgentData Implements llDetectedLink Fixes a few minor issues --- OpenSim/Region/ScriptEngine/XEngine/LSL2CSConverter.cs | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/OpenSim/Region/ScriptEngine/XEngine/LSL2CSConverter.cs b/OpenSim/Region/ScriptEngine/XEngine/LSL2CSConverter.cs index 9c59108..9e8ea54 100644 --- a/OpenSim/Region/ScriptEngine/XEngine/LSL2CSConverter.cs +++ b/OpenSim/Region/ScriptEngine/XEngine/LSL2CSConverter.cs @@ -302,6 +302,17 @@ namespace OpenSim.Region.ScriptEngine.XEngine RegexOptions.Compiled | RegexOptions.Multiline); } + // Change jumps into goto's and prefix its label + Script = + Regex.Replace(Script, + @"(\W)jump\s+([a-zA-Z_][a-zA-Z_0-9]*)\s*;", + @"$1goto label_$2;", RegexOptions.Compiled | RegexOptions.Multiline | RegexOptions.Singleline); + // and prefix labels so the do not clash with C#'s reserved words + Script = + Regex.Replace(Script, + @"@([a-zA-Z_][a-zA-Z_0-9]*)\s*;", + @"label_$1: ;", RegexOptions.Compiled | RegexOptions.Multiline | RegexOptions.Singleline); + // Add "void" in front of functions that needs it Script = Regex.Replace(Script, -- cgit v1.1