aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/ScriptEngine/Components/DotNetEngine/Compilers/Compiler_YP.cs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/ScriptEngine/Components/DotNetEngine/Compilers/Compiler_YP.cs (renamed from OpenSim/ApplicationPlugins/ScriptEngine/Components/ComponentBase.cs)32
1 files changed, 17 insertions, 15 deletions
diff --git a/OpenSim/ApplicationPlugins/ScriptEngine/Components/ComponentBase.cs b/OpenSim/ScriptEngine/Components/DotNetEngine/Compilers/Compiler_YP.cs
index 48c6bfe..c81ad76 100644
--- a/OpenSim/ApplicationPlugins/ScriptEngine/Components/ComponentBase.cs
+++ b/OpenSim/ScriptEngine/Components/DotNetEngine/Compilers/Compiler_YP.cs
@@ -26,28 +26,30 @@
26 */ 26 */
27using System; 27using System;
28using System.Collections.Generic; 28using System.Collections.Generic;
29using System.Reflection;
29using System.Text; 30using System.Text;
31using OpenSim.ScriptEngine.Components.DotNetEngine.Compilers.YP;
32using OpenSim.ScriptEngine.Shared;
30 33
31namespace OpenSim.ApplicationPlugins.ScriptEngine.Components 34namespace OpenSim.ScriptEngine.Components.DotNetEngine.Compilers
32{ 35{
33 /// <summary> 36 public class Compiler_YP: IScriptCompiler
34 /// Generic baseclass for component providers
35 /// </summary>
36 public abstract class ComponentBase //: iProviderBase
37 { 37 {
38 //public abstract iProviderBase CreateInstance(); 38
39 public abstract void Start(); 39 private readonly Compiler_CS m_Compiler_CS = new Compiler_CS();
40 public abstract void Close(); 40
41 public RegionScriptEngineBase scriptEngine; 41 public string Compile(ScriptMetaData scriptMetaData, ref string script)
42 public void Initialize(RegionScriptEngineBase ScriptEngine)
43 { 42 {
44 scriptEngine = ScriptEngine; 43 // Convert script to CS
44 string scriptCS = YP2CS.Convert(ref script);
45 // Use CS compiler to compile it
46 return m_Compiler_CS.Compile(scriptMetaData, ref scriptCS);
45 } 47 }
46 48
47 static ComponentBase() 49 public string PreProcessScript(ref string script)
48 { 50 {
49 // We got loaded -- should we register now? 51 // This is handled by our converter
50 //OpenSim.ApplicationPlugins.ScriptEngine.ComponentProviders.providers.Add(GetType()); 52 return script;
51 } 53 }
52 } 54 }
53} \ No newline at end of file 55}