From 9511a8c76370f21e839114007dcd2b25c69b009a Mon Sep 17 00:00:00 2001 From: Tedd Hansen Date: Sat, 8 Nov 2008 17:35:48 +0000 Subject: Work in progress on SECS stuff. Have been holding it off until after 0.6 release. Still messy as hell and doesn't really work yet. Will undergo dramatic changes. AND MOST IMPORTANTLY: Will be conformed to work in coop with todays DNE and XEngine, hopefully one day providing a common interface for all components. --- .../DotNetEngine/Compilers/Compiler_LSL.cs | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) (limited to 'OpenSim/ScriptEngine/Components/DotNetEngine/Compilers/Compiler_LSL.cs') diff --git a/OpenSim/ScriptEngine/Components/DotNetEngine/Compilers/Compiler_LSL.cs b/OpenSim/ScriptEngine/Components/DotNetEngine/Compilers/Compiler_LSL.cs index 3354ce9..d631c99 100644 --- a/OpenSim/ScriptEngine/Components/DotNetEngine/Compilers/Compiler_LSL.cs +++ b/OpenSim/ScriptEngine/Components/DotNetEngine/Compilers/Compiler_LSL.cs @@ -26,19 +26,32 @@ */ using System; using System.Collections.Generic; +using System.Reflection; using System.Text; -using OpenSim.ApplicationPlugins.ScriptEngine.Components; +using OpenSim.ScriptEngine.Components.DotNetEngine.Compilers.LSL; +using OpenSim.ScriptEngine.Shared; namespace OpenSim.ScriptEngine.Components.DotNetEngine.Compilers { - public class Compiler_LSL : CompilerBase + public class Compiler_LSL : IScriptCompiler { - public override void Start() + + + private readonly Compiler_CS m_Compiler_CS = new Compiler_CS(); + private readonly LSL2CS m_LSL2CS = new LSL2CS(); + + public string Compile(ScriptMetaData scriptMetaData, ref string script) { + // Convert script to CS + string scriptCS = m_LSL2CS.Convert(ref script); + // Use CS compiler to compile it + return m_Compiler_CS.Compile(scriptMetaData, ref scriptCS); } - public override void Close() + public string PreProcessScript(ref string script) { + // This is handled by our converter + return script; } } } -- cgit v1.1