Xanathar преди 10 години
родител
ревизия
de392f6688
променени са 35 файла, в които са добавени 1350 реда и са изтрити 31 реда
  1. 8 0
      src/DevTools/MoonSharpSL5ReplDemo/App.xaml
  2. 68 0
      src/DevTools/MoonSharpSL5ReplDemo/App.xaml.cs
  3. 63 0
      src/DevTools/MoonSharpSL5ReplDemo/MainPage.xaml
  4. 149 0
      src/DevTools/MoonSharpSL5ReplDemo/MainPage.xaml.cs
  5. 116 0
      src/DevTools/MoonSharpSL5ReplDemo/MoonSharpSL5ReplDemo.csproj
  6. 6 0
      src/DevTools/MoonSharpSL5ReplDemo/Properties/AppManifest.xml
  7. 35 0
      src/DevTools/MoonSharpSL5ReplDemo/Properties/AssemblyInfo.cs
  8. 31 0
      src/MoonSharp.Interpreter.Tests/EndToEnd/ClosureTests.cs
  9. 69 0
      src/MoonSharp.Interpreter.Tests/EndToEnd/CoroutineTests.cs
  10. 399 0
      src/MoonSharp.Interpreter.Tests/EndToEnd/UserDataFieldsTests.cs
  11. 1 0
      src/MoonSharp.Interpreter.Tests/MoonSharp.Interpreter.Tests.net35-client.csproj
  12. 3 0
      src/MoonSharp.Interpreter.Tests/_Projects/MoonSharp.Interpreter.Tests.Embeddable.portable40/MoonSharp.Interpreter.Tests.Embeddable.portable40.csproj
  13. 3 0
      src/MoonSharp.Interpreter.Tests/_Projects/MoonSharp.Interpreter.Tests.net40-client/MoonSharp.Interpreter.Tests.net40-client.csproj
  14. 3 0
      src/MoonSharp.Interpreter.Tests/_Projects/MoonSharp.Interpreter.Tests.portable40/MoonSharp.Interpreter.Tests.portable40.csproj
  15. 5 2
      src/MoonSharp.Interpreter/CoreLib/DebugModule.cs
  16. 20 0
      src/MoonSharp.Interpreter/DataTypes/Coroutine.cs
  17. 0 1
      src/MoonSharp.Interpreter/Interop/IUserDataType.cs
  18. 37 2
      src/MoonSharp.Interpreter/Interop/StandardDescriptors/StandardUserDataDescriptor.cs
  19. 145 0
      src/MoonSharp.Interpreter/Interop/StandardDescriptors/StandardUserDataFieldDescriptor.cs
  20. 7 2
      src/MoonSharp.Interpreter/Interop/StandardDescriptors/StandardUserDataOverloadedMethodDescriptor.cs
  21. 2 0
      src/MoonSharp.Interpreter/MoonSharp.Interpreter.net35-client.csproj
  22. 9 0
      src/MoonSharp.Interpreter/NameSpace_XmlHelp.cs
  23. 77 0
      src/MoonSharp.Interpreter/REPL/ReplHistoryNavigator.cs
  24. 6 6
      src/MoonSharp.Interpreter/REPL/ReplInterpreter.cs
  25. 1 1
      src/MoonSharp.Interpreter/Script.cs
  26. 3 1
      src/MoonSharp.Interpreter/Tree/Expression_.cs
  27. 29 12
      src/MoonSharp.Interpreter/Tree/Expressions/FunctionDefinitionExpression.cs
  28. 3 0
      src/MoonSharp.Interpreter/Tree/Lexer/Lexer.cs
  29. 1 0
      src/MoonSharp.Interpreter/Tree/Lexer/TokenType.cs
  30. 1 1
      src/MoonSharp.Interpreter/Tree/Statements/FunctionDefinitionStatement.cs
  31. 11 0
      src/MoonSharp.Interpreter/Tree/Statements/ReturnStatement.cs
  32. 10 1
      src/MoonSharp.Interpreter/_Projects/MoonSharp.Interpreter.net40-client/MoonSharp.Interpreter.net40-client.csproj
  33. 10 1
      src/MoonSharp.Interpreter/_Projects/MoonSharp.Interpreter.portable40/MoonSharp.Interpreter.portable40.csproj
  34. 1 1
      src/MoonSharp/Program.cs
  35. 18 0
      src/moonsharp.sln

+ 8 - 0
src/DevTools/MoonSharpSL5ReplDemo/App.xaml

@@ -0,0 +1,8 @@
+<Application xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
+             x:Class="MoonSharpSL5ReplDemo.App"
+             >
+    <Application.Resources>
+        
+    </Application.Resources>
+</Application>

+ 68 - 0
src/DevTools/MoonSharpSL5ReplDemo/App.xaml.cs

@@ -0,0 +1,68 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Net;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Documents;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Animation;
+using System.Windows.Shapes;
+
+namespace MoonSharpSL5ReplDemo
+{
+	public partial class App : Application
+	{
+
+		public App()
+		{
+			this.Startup += this.Application_Startup;
+			this.Exit += this.Application_Exit;
+			this.UnhandledException += this.Application_UnhandledException;
+
+			InitializeComponent();
+		}
+
+		private void Application_Startup(object sender, StartupEventArgs e)
+		{
+			this.RootVisual = new MainPage();
+		}
+
+		private void Application_Exit(object sender, EventArgs e)
+		{
+
+		}
+
+		private void Application_UnhandledException(object sender, ApplicationUnhandledExceptionEventArgs e)
+		{
+			// If the app is running outside of the debugger then report the exception using
+			// the browser's exception mechanism. On IE this will display it a yellow alert 
+			// icon in the status bar and Firefox will display a script error.
+			if (!System.Diagnostics.Debugger.IsAttached)
+			{
+
+				// NOTE: This will allow the application to continue running after an exception has been thrown
+				// but not handled. 
+				// For production applications this error handling should be replaced with something that will 
+				// report the error to the website and stop the application.
+				e.Handled = true;
+				Deployment.Current.Dispatcher.BeginInvoke(delegate { ReportErrorToDOM(e); });
+			}
+		}
+
+		private void ReportErrorToDOM(ApplicationUnhandledExceptionEventArgs e)
+		{
+			try
+			{
+				string errorMsg = e.ExceptionObject.Message + e.ExceptionObject.StackTrace;
+				errorMsg = errorMsg.Replace('"', '\'').Replace("\r\n", @"\n");
+
+				System.Windows.Browser.HtmlPage.Window.Eval("throw new Error(\"Unhandled Error in Silverlight Application " + errorMsg + "\");");
+			}
+			catch (Exception)
+			{
+			}
+		}
+	}
+}

+ 63 - 0
src/DevTools/MoonSharpSL5ReplDemo/MainPage.xaml

@@ -0,0 +1,63 @@
+<UserControl x:Class="MoonSharpSL5ReplDemo.MainPage"
+    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
+    mc:Ignorable="d"
+    d:DesignHeight="300" d:DesignWidth="400"
+    Loaded="UserControl_Loaded"
+        >
+
+    <Grid x:Name="LayoutRoot" Background="#222222">
+        <Grid.RowDefinitions>
+            <RowDefinition Height="*" />
+            <RowDefinition Height="Auto" />
+        </Grid.RowDefinitions>
+
+        <ScrollViewer Grid.Row="0" x:Name="scroller">
+            <TextBox x:Name="txtOutput" 
+
+                 AcceptsReturn="True" 
+                 TextWrapping="Wrap" 
+                 
+                 ScrollViewer.VerticalScrollBarVisibility="Visible" 
+                 FontFamily="Consolas, Courier New"
+                 FontSize="16"
+                 Background="#000000"
+                 Foreground="#DDDDDD"
+                 CaretBrush="#DDDD00"
+                 SelectionBackground="#00DDDD"
+                 SelectionForeground="#000000"
+                 IsReadOnly="True"
+                 />
+        </ScrollViewer>
+
+        <Grid Grid.Row="1" >
+            <Grid.ColumnDefinitions>
+                <ColumnDefinition Width="Auto" />
+                <ColumnDefinition Width="*" />
+            </Grid.ColumnDefinitions>
+
+
+            <TextBlock x:Name="lblPrompt" Grid.Column="0"                 
+                 FontFamily="Consolas, Courier New"
+                 FontSize="16"
+                 Foreground="#FFFF00" />
+
+            <TextBox x:Name="txtInput"  Grid.Column="1"   
+                 
+                 FontFamily="Consolas, Courier New"
+                 FontSize="16"
+                 Background="#333333"
+                 Foreground="#DDDDDD"
+                 CaretBrush="#DDDD00"
+                 SelectionBackground="#00DDDD"
+                 SelectionForeground="#000000"
+
+                 KeyDown="txtInput_KeyDown"
+                 />
+
+        </Grid>
+
+    </Grid>
+</UserControl>

+ 149 - 0
src/DevTools/MoonSharpSL5ReplDemo/MainPage.xaml.cs

@@ -0,0 +1,149 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Net;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Documents;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Animation;
+using System.Windows.Shapes;
+using MoonSharp.Interpreter;
+using MoonSharp.Interpreter.REPL;
+
+namespace MoonSharpSL5ReplDemo
+{
+	public partial class MainPage : UserControl
+	{
+		Script script;
+		ReplHistoryInterpreter interpreter;
+
+		public MainPage()
+		{
+			InitializeComponent();
+		}
+
+		private void UserControl_Loaded(object sender, RoutedEventArgs e)
+		{
+			Console_WriteLine("MoonSharp REPL {0} [{1}]", Script.VERSION, Script.GlobalOptions.Platform.GetPlatformName());
+			Console_WriteLine("Copyright (C) 2014-2015 Marco Mastropaolo");
+			Console_WriteLine("http://www.moonsharp.org");
+			Console_WriteLine();
+
+			Console_WriteLine("Type Lua code in the text box below to execute it.");
+			Console_WriteLine("The 'io', 'file' and parts of the 'os' modules are not available due to Silverlight restrictions.");
+			Console_WriteLine("Type list() or list(<table>) to see which globals are available.");
+			Console_WriteLine();
+			Console_WriteLine("Welcome.");
+			Console_WriteLine();
+
+			script = new Script(CoreModules.Preset_Complete);
+
+			script.DoString(@"
+local function pad(str, len)
+	str = str .. ' ' .. string.rep('.', len);
+	str = string.sub(str, 1, len);
+	return str;
+end
+
+function list(lib)
+	if (lib == nil) then lib = _G; end
+
+	if (type(lib) ~= 'table') then
+		print('A table was expected to list command.');
+		return
+	end
+
+	for k, v in pairs(lib) do
+		print(pad(type(v), 12) .. ' ' .. k)
+	end
+end");
+
+			script.Options.DebugPrint = s => Console_WriteLine(s);
+
+			interpreter = new ReplHistoryInterpreter(script, 100)
+			{
+				HandleDynamicExprs = true,
+				HandleClassicExprsSyntax = true
+			};
+
+
+			DoPrompt();
+		}
+
+		private void Console_WriteLine(string str = null)
+		{
+			txtOutput.Text += (str ?? "") + "\n";
+			scroller.ScrollToVerticalOffset(scroller.ScrollableHeight);
+			scroller.UpdateLayout();
+		}
+
+		private void Console_WriteLine(string format, params object[] args)
+		{
+			string str = string.Format(format, args);
+			Console_WriteLine(str);
+		}
+
+		private void DoPrompt()
+		{
+			lblPrompt.Text = interpreter.ClassicPrompt;
+			txtInput.Text = "";
+			txtInput.Focus();
+		}
+
+		private void txtInput_KeyDown(object sender, KeyEventArgs e)
+		{
+			if (e.Key == Key.Enter)
+			{
+				Console_WriteLine(lblPrompt.Text + " " + txtInput.Text);
+
+				try
+				{
+					DynValue dv = interpreter.Evaluate(txtInput.Text);
+
+					if (dv != null)
+					{
+						if (dv.Type == DataType.Void)
+							Console_WriteLine("ok");
+						else
+							Console_WriteLine("{0}", dv);
+					}
+				}
+				catch (InterpreterException ex)
+				{
+					Console_WriteLine("{0}", ex.DecoratedMessage ?? ex.Message);
+				}
+				catch (Exception ex)
+				{
+					Console_WriteLine("Unexpected error: {0}", ex.Message);
+				}
+
+				DoPrompt();
+			}
+			else if (e.Key == Key.Up)
+			{
+				string v = interpreter.HistoryPrev();
+				if (v != null)
+				{
+					txtInput.Text = v;
+					txtInput.Select(txtInput.Text.Length, 0);
+				}
+			}
+			else if (e.Key == Key.Down)
+			{
+				string v = interpreter.HistoryNext();
+				if (v != null)
+				{
+					txtInput.Text = v;
+					txtInput.Select(txtInput.Text.Length, 0);
+				}
+			}
+
+		}
+
+
+
+
+	}
+}

+ 116 - 0
src/DevTools/MoonSharpSL5ReplDemo/MoonSharpSL5ReplDemo.csproj

@@ -0,0 +1,116 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <PropertyGroup>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+    <ProductVersion>8.0.50727</ProductVersion>
+    <SchemaVersion>2.0</SchemaVersion>
+    <ProjectGuid>{69B110B4-E578-4854-8F63-D80E4E14E1B6}</ProjectGuid>
+    <ProjectTypeGuids>{A1591282-1198-4647-A2B1-27E5FF5F6F3B};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
+    <OutputType>Library</OutputType>
+    <AppDesignerFolder>Properties</AppDesignerFolder>
+    <RootNamespace>MoonSharpSL5ReplDemo</RootNamespace>
+    <AssemblyName>MoonSharpSL5ReplDemo</AssemblyName>
+    <TargetFrameworkIdentifier>Silverlight</TargetFrameworkIdentifier>
+    <TargetFrameworkVersion>v5.0</TargetFrameworkVersion>
+    <SilverlightVersion>$(TargetFrameworkVersion)</SilverlightVersion>
+    <SilverlightApplication>true</SilverlightApplication>
+    <SupportedCultures>
+    </SupportedCultures>
+    <XapOutputs>true</XapOutputs>
+    <GenerateSilverlightManifest>true</GenerateSilverlightManifest>
+    <XapFilename>MoonSharpSL5ReplDemo.xap</XapFilename>
+    <SilverlightManifestTemplate>Properties\AppManifest.xml</SilverlightManifestTemplate>
+    <SilverlightAppEntry>MoonSharpSL5ReplDemo.App</SilverlightAppEntry>
+    <TestPageFileName>MoonSharpSL5ReplDemoTestPage.html</TestPageFileName>
+    <CreateTestPage>true</CreateTestPage>
+    <ValidateXaml>true</ValidateXaml>
+    <EnableOutOfBrowser>false</EnableOutOfBrowser>
+    <OutOfBrowserSettingsFile>Properties\OutOfBrowserSettings.xml</OutOfBrowserSettingsFile>
+    <UsePlatformExtensions>false</UsePlatformExtensions>
+    <ThrowErrorsInValidation>true</ThrowErrorsInValidation>
+    <LinkedServerProject>
+    </LinkedServerProject>
+  </PropertyGroup>
+  <!-- This property group is only here to support building this project using the 
+       MSBuild 3.5 toolset. In order to work correctly with this older toolset, it needs 
+       to set the TargetFrameworkVersion to v3.5 -->
+  <PropertyGroup Condition="'$(MSBuildToolsVersion)' == '3.5'">
+    <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+    <DebugSymbols>true</DebugSymbols>
+    <DebugType>full</DebugType>
+    <Optimize>false</Optimize>
+    <OutputPath>Bin\Debug</OutputPath>
+    <DefineConstants>DEBUG;TRACE;SILVERLIGHT</DefineConstants>
+    <NoStdLib>true</NoStdLib>
+    <NoConfig>true</NoConfig>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+    <DebugType>pdbonly</DebugType>
+    <Optimize>true</Optimize>
+    <OutputPath>Bin\Release</OutputPath>
+    <DefineConstants>TRACE;SILVERLIGHT</DefineConstants>
+    <NoStdLib>true</NoStdLib>
+    <NoConfig>true</NoConfig>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <ItemGroup>
+    <Reference Include="mscorlib" />
+    <Reference Include="System.Windows" />
+    <Reference Include="system" />
+    <Reference Include="System.Core">
+      <HintPath>$(TargetFrameworkDirectory)System.Core.dll</HintPath>
+    </Reference>
+    <Reference Include="System.Net" />
+    <Reference Include="System.Xml" />
+    <Reference Include="System.Windows.Browser" />
+  </ItemGroup>
+  <ItemGroup>
+    <Compile Include="App.xaml.cs">
+      <DependentUpon>App.xaml</DependentUpon>
+    </Compile>
+    <Compile Include="MainPage.xaml.cs">
+      <DependentUpon>MainPage.xaml</DependentUpon>
+    </Compile>
+    <Compile Include="Properties\AssemblyInfo.cs" />
+  </ItemGroup>
+  <ItemGroup>
+    <ApplicationDefinition Include="App.xaml">
+      <SubType>Designer</SubType>
+      <Generator>MSBuild:Compile</Generator>
+    </ApplicationDefinition>
+    <Page Include="MainPage.xaml">
+      <SubType>Designer</SubType>
+      <Generator>MSBuild:Compile</Generator>
+    </Page>
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="Properties\AppManifest.xml" />
+  </ItemGroup>
+  <ItemGroup>
+    <ProjectReference Include="..\..\MoonSharp.Interpreter\_Projects\MoonSharp.Interpreter.portable40\MoonSharp.Interpreter.portable40.csproj">
+      <Project>{49f32476-fca0-45fd-8f89-0c7c0d15e409}</Project>
+      <Name>MoonSharp.Interpreter.portable40</Name>
+    </ProjectReference>
+  </ItemGroup>
+  <Import Project="$(MSBuildExtensionsPath32)\Microsoft\Silverlight\$(SilverlightVersion)\Microsoft.Silverlight.CSharp.targets" />
+  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
+       Other similar extension points exist, see Microsoft.Common.targets.
+  <Target Name="BeforeBuild">
+  </Target>
+  <Target Name="AfterBuild">
+  </Target>
+  -->
+  <ProjectExtensions>
+    <VisualStudio>
+      <FlavorProperties GUID="{A1591282-1198-4647-A2B1-27E5FF5F6F3B}">
+        <SilverlightProjectProperties />
+      </FlavorProperties>
+    </VisualStudio>
+  </ProjectExtensions>
+</Project>

+ 6 - 0
src/DevTools/MoonSharpSL5ReplDemo/Properties/AppManifest.xml

@@ -0,0 +1,6 @@
+<Deployment xmlns="http://schemas.microsoft.com/client/2007/deployment"
+        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+>
+    <Deployment.Parts>
+    </Deployment.Parts>
+</Deployment>

+ 35 - 0
src/DevTools/MoonSharpSL5ReplDemo/Properties/AssemblyInfo.cs

@@ -0,0 +1,35 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following 
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("MoonSharpSL5ReplDemo")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("MoonSharpSL5ReplDemo")]
+[assembly: AssemblyCopyright("Copyright ©  2015")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible 
+// to COM components.  If you need to access a type in this assembly from 
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("69b110b4-e578-4854-8f63-d80e4e14e1b6")]
+
+// Version information for an assembly consists of the following four values:
+//
+//      Major Version
+//      Minor Version 
+//      Build Number
+//      Revision
+//
+// You can specify all the values or you can default the Revision and Build Numbers 
+// by using the '*' as shown below:
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]

+ 31 - 0
src/MoonSharp.Interpreter.Tests/EndToEnd/ClosureTests.cs

@@ -26,6 +26,37 @@ namespace MoonSharp.Interpreter.Tests
 			Assert.AreEqual(5, res.Number);
 		}
 
+		[Test]
+		public void LambdaFunctions()
+		{
+			string script = @"
+g = |f, x|f(x, x+1)
+f = |x, y, z|x*(y+z)
+return g(|x,y|f(x,y,1), 2)
+";
+			DynValue res = Script.RunString(script);
+
+			Assert.AreEqual(DataType.Number, res.Type);
+			Assert.AreEqual(8, res.Number);
+		}
+
+
+
+		[Test]
+		public void ClosureOnParamLambda()
+		{
+			string script = @"
+				local function g (z)
+				  return |a| a + z
+				end
+
+				return (g(3)(2));";
+
+			DynValue res = Script.RunString(script);
+
+			Assert.AreEqual(DataType.Number, res.Type);
+			Assert.AreEqual(5, res.Number);
+		}
 
 
 		[Test]

+ 69 - 0
src/MoonSharp.Interpreter.Tests/EndToEnd/CoroutineTests.cs

@@ -163,6 +163,75 @@ checkresume(6, false, 'cannot resume dead coroutine');
 			script.DoString(code);
 		}
 
+		[Test]
+		public void Coroutine_Direct_Resume()
+		{
+			string code = @"
+				return function()
+					local x = 0
+					while true do
+						x = x + 1
+						coroutine.yield(x)
+						if (x > 5) then
+							return 7
+						end
+					end
+				end
+				";
+
+			// Load the code and get the returned function
+			Script script = new Script();
+			DynValue function = script.DoString(code);
+
+			// Create the coroutine in C#
+			DynValue coroutine = script.CreateCoroutine(function);
+
+			// Loop the coroutine 
+			string ret = "";
+			while (coroutine.Coroutine.State != CoroutineState.Dead)
+			{
+				DynValue x = coroutine.Coroutine.Resume();
+				ret = ret + x.ToString();
+			}
+
+			Assert.AreEqual("1234567", ret);
+		}
+
+
+		[Test]
+		public void Coroutine_Direct_AsEnumerable()
+		{
+			string code = @"
+				return function()
+					local x = 0
+					while true do
+						x = x + 1
+						coroutine.yield(x)
+						if (x > 5) then
+							return 7
+						end
+					end
+				end
+				";
+
+			// Load the code and get the returned function
+			Script script = new Script();
+			DynValue function = script.DoString(code);
+
+			// Create the coroutine in C#
+			DynValue coroutine = script.CreateCoroutine(function);
+
+			// Loop the coroutine 
+			string ret = "";
+
+			foreach (DynValue x in coroutine.Coroutine.AsTypedEnumerable())
+			{
+				ret = ret + x.ToString();
+			}
+
+			Assert.AreEqual("1234567", ret);
+		}
+
 
 
 

+ 399 - 0
src/MoonSharp.Interpreter.Tests/EndToEnd/UserDataFieldsTests.cs

@@ -0,0 +1,399 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using NUnit.Framework;
+
+namespace MoonSharp.Interpreter.Tests.EndToEnd
+{
+#pragma warning disable 169 // unused private field
+
+	[TestFixture]
+	public class UserDataFieldsTests
+	{
+		public class SomeClass
+		{
+			public int IntProp;
+			public int? NIntProp;
+			public object ObjProp;
+			public static string StaticProp;
+			private string PrivateProp;
+		}
+
+		public void Test_IntFieldGetter(InteropAccessMode opt)
+		{
+			string script = @"    
+				x = myobj.IntProp;
+				return x;";
+
+			Script S = new Script();
+
+			SomeClass obj = new SomeClass() {  IntProp = 321 };
+
+			UserData.UnregisterType<SomeClass>();
+			UserData.RegisterType<SomeClass>(opt);
+
+			S.Globals.Set("myobj", UserData.Create(obj));
+
+			DynValue res = S.DoString(script);
+
+			Assert.AreEqual(DataType.Number, res.Type);
+			Assert.AreEqual(321, res.Number);
+		}
+
+		public void Test_NIntFieldGetter(InteropAccessMode opt)
+		{
+			string script = @"    
+				x = myobj1.NIntProp;
+				y = myobj2.NIntProp;
+				return x,y;";
+
+			Script S = new Script();
+
+			SomeClass obj1 = new SomeClass() { NIntProp = 321 };
+			SomeClass obj2 = new SomeClass() { NIntProp = null };
+
+			UserData.UnregisterType<SomeClass>();
+			UserData.RegisterType<SomeClass>(opt);
+
+			S.Globals.Set("myobj1", UserData.Create(obj1));
+			S.Globals.Set("myobj2", UserData.Create(obj2));
+
+			DynValue res = S.DoString(script);
+
+			Assert.AreEqual(DataType.Tuple, res.Type);
+			Assert.AreEqual(321.0, res.Tuple[0].Number);
+			Assert.AreEqual(DataType.Number, res.Tuple[0].Type);
+			Assert.AreEqual(DataType.Nil, res.Tuple[1].Type);
+		}
+
+		public void Test_ObjFieldGetter(InteropAccessMode opt)
+		{
+			string script = @"    
+				x = myobj1.ObjProp;
+				y = myobj2.ObjProp;
+				z = myobj2.ObjProp.ObjProp;
+				return x,y,z;";
+
+			Script S = new Script();
+
+			SomeClass obj1 = new SomeClass() { ObjProp="ciao" };
+			SomeClass obj2 = new SomeClass() { ObjProp = obj1 };
+
+			UserData.UnregisterType<SomeClass>();
+			UserData.RegisterType<SomeClass>(opt);
+
+			S.Globals.Set("myobj1", UserData.Create(obj1));
+			S.Globals.Set("myobj2", UserData.Create(obj2));
+
+			DynValue res = S.DoString(script);
+
+			Assert.AreEqual(DataType.Tuple, res.Type);
+			Assert.AreEqual(DataType.String, res.Tuple[0].Type);
+			Assert.AreEqual("ciao", res.Tuple[0].String);
+			Assert.AreEqual(DataType.String, res.Tuple[2].Type);
+			Assert.AreEqual("ciao", res.Tuple[2].String);
+			Assert.AreEqual(DataType.UserData, res.Tuple[1].Type);
+			Assert.AreEqual(obj1, res.Tuple[1].UserData.Object);
+		}
+
+		public void Test_IntFieldSetter(InteropAccessMode opt)
+		{
+			string script = @"    
+				myobj.IntProp = 19;";
+
+			Script S = new Script();
+
+			SomeClass obj = new SomeClass() { IntProp = 321 };
+
+			UserData.UnregisterType<SomeClass>();
+			UserData.RegisterType<SomeClass>(opt);
+
+			S.Globals.Set("myobj", UserData.Create(obj));
+
+			Assert.AreEqual(321, obj.IntProp);
+
+			DynValue res = S.DoString(script);
+
+			Assert.AreEqual(19, obj.IntProp);
+		}
+
+		public void Test_NIntFieldSetter(InteropAccessMode opt)
+		{
+			string script = @"    
+				myobj1.NIntProp = nil;
+				myobj2.NIntProp = 19;";
+
+			Script S = new Script();
+
+			SomeClass obj1 = new SomeClass() { NIntProp = 321 };
+			SomeClass obj2 = new SomeClass() { NIntProp = null };
+
+			UserData.UnregisterType<SomeClass>();
+			UserData.RegisterType<SomeClass>(opt);
+
+			S.Globals.Set("myobj1", UserData.Create(obj1));
+			S.Globals.Set("myobj2", UserData.Create(obj2));
+
+			Assert.AreEqual(321, obj1.NIntProp);
+			Assert.AreEqual(null, obj2.NIntProp);
+
+			DynValue res = S.DoString(script);
+	
+			Assert.AreEqual(null, obj1.NIntProp);
+			Assert.AreEqual(19, obj2.NIntProp);
+		}
+
+		public void Test_ObjFieldSetter(InteropAccessMode opt)
+		{
+			string script = @"    
+				myobj1.ObjProp = myobj2;
+				myobj2.ObjProp = 'hello';";
+
+			Script S = new Script();
+
+			SomeClass obj1 = new SomeClass() { ObjProp = "ciao" };
+			SomeClass obj2 = new SomeClass() { ObjProp = obj1 };
+
+			UserData.UnregisterType<SomeClass>();
+			UserData.RegisterType<SomeClass>(opt);
+
+			S.Globals.Set("myobj1", UserData.Create(obj1));
+			S.Globals.Set("myobj2", UserData.Create(obj2));
+
+			Assert.AreEqual("ciao", obj1.ObjProp);
+			Assert.AreEqual(obj1, obj2.ObjProp);
+
+			DynValue res = S.DoString(script);
+
+			Assert.AreEqual(obj2, obj1.ObjProp);
+			Assert.AreEqual("hello", obj2.ObjProp);
+		}
+
+		public void Test_InvalidFieldSetter(InteropAccessMode opt)
+		{
+			string script = @"    
+				myobj.IntProp = '19';";
+
+			Script S = new Script();
+
+			SomeClass obj = new SomeClass() { IntProp = 321 };
+
+			UserData.UnregisterType<SomeClass>();
+			UserData.RegisterType<SomeClass>(opt);
+
+			S.Globals.Set("myobj", UserData.Create(obj));
+
+			Assert.AreEqual(321, obj.IntProp);
+
+			DynValue res = S.DoString(script);
+
+			Assert.AreEqual(19, obj.IntProp);
+		}
+
+		public void Test_StaticFieldAccess(InteropAccessMode opt)
+		{
+			string script = @"    
+				static.StaticProp = 'asdasd' .. static.StaticProp;";
+
+			Script S = new Script();
+
+			SomeClass.StaticProp = "qweqwe";
+
+			UserData.UnregisterType<SomeClass>();
+			UserData.RegisterType<SomeClass>(opt);
+
+			S.Globals.Set("static", UserData.CreateStatic<SomeClass>());
+
+			Assert.AreEqual("qweqwe", SomeClass.StaticProp);
+
+			DynValue res = S.DoString(script);
+
+			Assert.AreEqual("asdasdqweqwe", SomeClass.StaticProp);
+		}
+
+		[Test]
+		public void Interop_IntFieldGetter_None()
+		{
+			Test_IntFieldGetter(InteropAccessMode.Reflection);
+		}
+
+		[Test]
+		public void Interop_IntFieldGetter_Lazy()
+		{
+			Test_IntFieldGetter(InteropAccessMode.LazyOptimized);
+		}
+
+		[Test]
+		public void Interop_IntFieldGetter_Precomputed()
+		{
+			Test_IntFieldGetter(InteropAccessMode.Preoptimized);
+		}
+
+		[Test]
+		public void Interop_NIntFieldGetter_None()
+		{
+			Test_NIntFieldGetter(InteropAccessMode.Reflection);
+		}
+
+		[Test]
+		public void Interop_NIntFieldGetter_Lazy()
+		{
+			Test_NIntFieldGetter(InteropAccessMode.LazyOptimized);
+		}
+
+		[Test]
+		public void Interop_NIntFieldGetter_Precomputed()
+		{
+			Test_NIntFieldGetter(InteropAccessMode.Preoptimized);
+		}
+
+		[Test]
+		public void Interop_ObjFieldGetter_None()
+		{
+			Test_ObjFieldGetter(InteropAccessMode.Reflection);
+		}
+
+		[Test]
+		public void Interop_ObjFieldGetter_Lazy()
+		{
+			Test_ObjFieldGetter(InteropAccessMode.LazyOptimized);
+		}
+
+		[Test]
+		public void Interop_ObjFieldGetter_Precomputed()
+		{
+			Test_ObjFieldGetter(InteropAccessMode.Preoptimized);
+		}
+
+		[Test]
+		public void Interop_IntFieldSetter_None()
+		{
+			Test_IntFieldSetter(InteropAccessMode.Reflection);
+		}
+
+		[Test]
+		public void Interop_IntFieldSetter_Lazy()
+		{
+			Test_IntFieldSetter(InteropAccessMode.LazyOptimized);
+		}
+
+		[Test]
+		public void Interop_IntFieldSetter_Precomputed()
+		{
+			Test_IntFieldSetter(InteropAccessMode.Preoptimized);
+		}
+
+		[Test]
+		public void Interop_NIntFieldSetter_None()
+		{
+			Test_NIntFieldSetter(InteropAccessMode.Reflection);
+		}
+
+		[Test]
+		public void Interop_NIntFieldSetter_Lazy()
+		{
+			Test_NIntFieldSetter(InteropAccessMode.LazyOptimized);
+		}
+
+		[Test]
+		public void Interop_NIntFieldSetter_Precomputed()
+		{
+			Test_NIntFieldSetter(InteropAccessMode.Preoptimized);
+		}
+
+		[Test]
+		public void Interop_ObjFieldSetter_None()
+		{
+			Test_ObjFieldSetter(InteropAccessMode.Reflection);
+		}
+
+		[Test]
+		public void Interop_ObjFieldSetter_Lazy()
+		{
+			Test_ObjFieldSetter(InteropAccessMode.LazyOptimized);
+		}
+
+		[Test]
+		public void Interop_ObjFieldSetter_Precomputed()
+		{
+			Test_ObjFieldSetter(InteropAccessMode.Preoptimized);
+		}
+
+
+		[Test]
+		[ExpectedException(typeof(ScriptRuntimeException))]
+		public void Interop_InvalidFieldSetter_None()
+		{
+			Test_InvalidFieldSetter(InteropAccessMode.Reflection);
+		}
+
+		[Test]
+		[ExpectedException(typeof(ScriptRuntimeException))]
+		public void Interop_InvalidFieldSetter_Lazy()
+		{
+			Test_InvalidFieldSetter(InteropAccessMode.LazyOptimized);
+		}
+
+		[Test]
+		[ExpectedException(typeof(ScriptRuntimeException))]
+		public void Interop_InvalidFieldSetter_Precomputed()
+		{
+			Test_InvalidFieldSetter(InteropAccessMode.Preoptimized);
+		}
+
+
+		[Test]
+		public void Interop_StaticFieldAccess_None()
+		{
+			Test_StaticFieldAccess(InteropAccessMode.Reflection);
+		}
+
+		[Test]
+		public void Interop_StaticFieldAccess_Lazy()
+		{
+			Test_StaticFieldAccess(InteropAccessMode.LazyOptimized);
+		}
+
+		[Test]
+		public void Interop_StaticFieldAccess_Precomputed()
+		{
+			Test_StaticFieldAccess(InteropAccessMode.Preoptimized);
+		}
+
+
+
+		[Test]
+		public void Interop_IntFieldSetterWithSimplifiedSyntax()
+		{
+			string script = @"    
+				myobj.IntProp = 19;";
+
+			Script S = new Script();
+
+			SomeClass obj = new SomeClass() { IntProp = 321 };
+
+			UserData.UnregisterType<SomeClass>();
+			UserData.RegisterType<SomeClass>();
+
+			S.Globals["myobj"] = obj;
+
+			Assert.AreEqual(321, obj.IntProp);
+
+			DynValue res = S.DoString(script);
+
+			Assert.AreEqual(obj, S.Globals["myobj"]);
+			Assert.AreEqual(19, obj.IntProp);
+		}
+
+		[Test]
+		public void Interop_Boh()
+		{
+			Script s = new Script();
+			long big = long.MaxValue;
+			var v = DynValue.FromObject(s, big);
+			Assert.IsNotNull(v);
+		}
+
+	}
+}

+ 1 - 0
src/MoonSharp.Interpreter.Tests/MoonSharp.Interpreter.Tests.net35-client.csproj

@@ -112,6 +112,7 @@
     <Compile Include="EndToEnd\UserDataIndexerTests.cs" />
     <Compile Include="EndToEnd\UserDataMethodsTests.cs" />
     <Compile Include="EndToEnd\UserDataOverloadsTests.cs" />
+    <Compile Include="EndToEnd\UserDataFieldsTests.cs" />
     <Compile Include="EndToEnd\UserDataPropertiesTests.cs">
       <SubType>Code</SubType>
     </Compile>

+ 3 - 0
src/MoonSharp.Interpreter.Tests/_Projects/MoonSharp.Interpreter.Tests.Embeddable.portable40/MoonSharp.Interpreter.Tests.Embeddable.portable40.csproj

@@ -95,6 +95,9 @@
     <Compile Include="..\..\EndToEnd\UserDataOverloadsTests.cs">
       <Link>UserDataOverloadsTests.cs</Link>
     </Compile>
+    <Compile Include="..\..\EndToEnd\UserDataFieldsTests.cs">
+      <Link>UserDataFieldsTests.cs</Link>
+    </Compile>
     <Compile Include="..\..\EndToEnd\UserDataPropertiesTests.cs">
       <SubType>Code</SubType>
       <Link>UserDataPropertiesTests.cs</Link>

+ 3 - 0
src/MoonSharp.Interpreter.Tests/_Projects/MoonSharp.Interpreter.Tests.net40-client/MoonSharp.Interpreter.Tests.net40-client.csproj

@@ -111,6 +111,9 @@
     <Compile Include="..\..\EndToEnd\UserDataOverloadsTests.cs">
       <Link>UserDataOverloadsTests.cs</Link>
     </Compile>
+    <Compile Include="..\..\EndToEnd\UserDataFieldsTests.cs">
+      <Link>UserDataFieldsTests.cs</Link>
+    </Compile>
     <Compile Include="..\..\EndToEnd\UserDataPropertiesTests.cs">
       <SubType>Code</SubType>
       <Link>UserDataPropertiesTests.cs</Link>

+ 3 - 0
src/MoonSharp.Interpreter.Tests/_Projects/MoonSharp.Interpreter.Tests.portable40/MoonSharp.Interpreter.Tests.portable40.csproj

@@ -111,6 +111,9 @@
     <Compile Include="..\..\EndToEnd\UserDataOverloadsTests.cs">
       <Link>UserDataOverloadsTests.cs</Link>
     </Compile>
+    <Compile Include="..\..\EndToEnd\UserDataFieldsTests.cs">
+      <Link>UserDataFieldsTests.cs</Link>
+    </Compile>
     <Compile Include="..\..\EndToEnd\UserDataPropertiesTests.cs">
       <SubType>Code</SubType>
       <Link>UserDataPropertiesTests.cs</Link>

+ 5 - 2
src/MoonSharp.Interpreter/CoreLib/DebugModule.cs

@@ -18,7 +18,10 @@ namespace MoonSharp.Interpreter.CoreLib
 		public static DynValue debug(ScriptExecutionContext executionContext, CallbackArguments args)
 		{
 			Script script = executionContext.GetScript();
-			
+
+			if (script.Options.DebugInput == null)
+				throw new ScriptRuntimeException("debug.debug not supported on this platform/configuration");
+
 			ReplInterpreter interpreter = new ReplInterpreter(script)
 				{
 					HandleDynamicExprs = false,
@@ -31,7 +34,7 @@ namespace MoonSharp.Interpreter.CoreLib
 
 				try
 				{
-					DynValue result = interpreter.ExecuteRepl(s);
+					DynValue result = interpreter.Evaluate(s);
 
 					if (result != null && result.Type != DataType.Void)
 						script.Options.DebugPrint(string.Format("{0}", result));

+ 20 - 0
src/MoonSharp.Interpreter/DataTypes/Coroutine.cs

@@ -63,6 +63,26 @@ namespace MoonSharp.Interpreter
 		}
 
 
+		/// <summary>
+		/// Gets this coroutine as a typed enumerable which can be looped over for resuming.
+		/// </summary>
+		/// <returns></returns>
+		public IEnumerable<DynValue> AsTypedEnumerable()
+		{
+			while (this.State == CoroutineState.NotStarted || this.State == CoroutineState.Suspended)
+				yield return Resume();
+		}
+
+		/// <summary>
+		/// Gets this coroutine as a System.Collections.IEnumerator. This should bridge with Unity3D coroutines.
+		/// </summary>
+		/// <returns></returns>
+		public System.Collections.IEnumerator AsEnumerator()
+		{
+			return AsTypedEnumerable().GetEnumerator();
+		}
+
+
 		/// <summary>
 		/// Resumes the coroutine
 		/// </summary>

+ 0 - 1
src/MoonSharp.Interpreter/Interop/IUserDataType.cs

@@ -44,7 +44,6 @@ namespace MoonSharp.Interpreter.Interop
 		/// 
 		/// </summary>
 		/// <param name="script">The script originating the request</param>
-		/// <param name="obj">The object (null if a static request is done)</param>
 		/// <param name="metaname">The name of the metamember.</param>
 		/// <returns></returns>
 		DynValue MetaIndex(Script script, string metaname);

+ 37 - 2
src/MoonSharp.Interpreter/Interop/StandardDescriptors/StandardUserDataDescriptor.cs

@@ -36,6 +36,7 @@ namespace MoonSharp.Interpreter.Interop
 		private Dictionary<string, StandardUserDataOverloadedMethodDescriptor> m_MetaMethods = new Dictionary<string, StandardUserDataOverloadedMethodDescriptor>();
 		private Dictionary<string, StandardUserDataOverloadedMethodDescriptor> m_Methods = new Dictionary<string, StandardUserDataOverloadedMethodDescriptor>();
 		private Dictionary<string, StandardUserDataPropertyDescriptor> m_Properties = new Dictionary<string, StandardUserDataPropertyDescriptor>();
+		private Dictionary<string, StandardUserDataFieldDescriptor> m_Fields = new Dictionary<string, StandardUserDataFieldDescriptor>();
 
 		const string SPECIAL_GETITEM = "get_Item";
 		const string SPECIAL_SETITEM = "set_Item";
@@ -133,6 +134,19 @@ namespace MoonSharp.Interpreter.Interop
 						m_Properties.Add(pd.Name, pd);
 					}
 				}
+
+				// get fields
+				foreach (FieldInfo fi in type.GetFields(BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.Static))
+				{
+					if (CheckVisibility(fi.GetCustomAttributes(true), fi.IsPublic))
+					{
+						if (fi.IsSpecialName)
+							continue;
+
+						var pd = new StandardUserDataFieldDescriptor(fi, this.AccessMode);
+						m_Fields.Add(pd.Name, pd);
+					}
+				}
 			}
 		}
 
@@ -266,6 +280,11 @@ namespace MoonSharp.Interpreter.Interop
 			if (m_Properties.TryGetValue(indexName, out pdesc))
 				return pdesc.GetValue(script, obj);
 
+			StandardUserDataFieldDescriptor fdesc;
+
+			if (m_Fields.TryGetValue(indexName, out fdesc))
+				return fdesc.GetValue(script, obj);
+
 			return null;
 		}
 
@@ -332,9 +351,22 @@ namespace MoonSharp.Interpreter.Interop
 				pdesc.SetValue(script, obj, value);
 				return true;
 			}
-			else
+			else 
 			{
-				return false;
+				StandardUserDataFieldDescriptor fdesc;
+
+				lock (m_Lock)
+					fdesc = m_Fields.GetOrDefault(indexName);
+
+				if (fdesc != null)
+				{
+					fdesc.SetValue(script, obj, value);
+					return true;
+				}
+				else
+				{
+					return false;
+				}
 			}
 		}
 
@@ -349,6 +381,8 @@ namespace MoonSharp.Interpreter.Interop
 				m.OptimizeSetter();
 			}
 
+			foreach (var m in this.m_Fields.Values)
+				m.OptimizeGetter();
 		}
 
 		/// <summary>
@@ -474,6 +508,7 @@ namespace MoonSharp.Interpreter.Interop
 		/// <param name="script">The script originating the request</param>
 		/// <param name="obj">The object (null if a static request is done)</param>
 		/// <param name="metaname">The name of the metamember.</param>
+		/// </summary>
 		/// <returns></returns>
 		public virtual DynValue MetaIndex(Script script, object obj, string metaname)
 		{

+ 145 - 0
src/MoonSharp.Interpreter/Interop/StandardDescriptors/StandardUserDataFieldDescriptor.cs

@@ -0,0 +1,145 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Linq.Expressions;
+using System.Reflection;
+using System.Text;
+using System.Threading;
+using MoonSharp.Interpreter.Diagnostics;
+using MoonSharp.Interpreter.Interop.Converters;
+
+namespace MoonSharp.Interpreter.Interop
+{
+	/// <summary>
+	/// Class providing easier marshalling of CLR fields
+	/// </summary>
+	public class StandardUserDataFieldDescriptor
+	{
+		/// <summary>
+		/// Gets the FieldInfo got by reflection
+		/// </summary>
+		public FieldInfo FieldInfo { get; private set; }
+		/// <summary>
+		/// Gets the <see cref="InteropAccessMode" />
+		/// </summary>
+		public InteropAccessMode AccessMode { get; private set; }
+		/// <summary>
+		/// Gets a value indicating whether the described property is static.
+		/// </summary>
+		public bool IsStatic { get; private set; }
+		/// <summary>
+		/// Gets the name of the property
+		/// </summary>
+		public string Name { get; private set; }
+
+		Func<object, object> m_OptimizedGetter = null;
+
+
+		/// <summary>
+		/// Initializes a new instance of the <see cref="StandardUserDataPropertyDescriptor"/> class.
+		/// </summary>
+		/// <param name="fi">The FieldInfo.</param>
+		/// <param name="accessMode">The <see cref="InteropAccessMode" /> </param>
+		internal StandardUserDataFieldDescriptor(FieldInfo fi, InteropAccessMode accessMode)
+		{
+			if (Script.GlobalOptions.Platform.IsRunningOnAOT())
+				accessMode = InteropAccessMode.Reflection;
+
+			this.FieldInfo = fi;
+			this.AccessMode = accessMode;
+			this.Name = fi.Name;
+			this.IsStatic = this.FieldInfo.IsStatic;
+
+			if (AccessMode == InteropAccessMode.Preoptimized)
+			{
+				this.OptimizeGetter();
+			}
+		}
+
+
+		/// <summary>
+		/// Gets the value of the property
+		/// </summary>
+		/// <param name="script">The script.</param>
+		/// <param name="obj">The object.</param>
+		/// <returns></returns>
+		public DynValue GetValue(Script script, object obj)
+		{
+			if (AccessMode == InteropAccessMode.LazyOptimized && m_OptimizedGetter == null)
+				OptimizeGetter();
+
+			object result = null;
+
+			if (m_OptimizedGetter != null)
+				result = m_OptimizedGetter(obj);
+			else
+				result = FieldInfo.GetValue(obj);
+
+			return ClrToScriptConversions.ObjectToDynValue(script, result);
+		}
+
+		internal void OptimizeGetter()
+		{
+			using (PerformanceStatistics.StartGlobalStopwatch(PerformanceCounter.AdaptersCompilation))
+			{
+				if (IsStatic)
+				{
+					var paramExp = Expression.Parameter(typeof(object), "dummy");
+					var propAccess = Expression.Field(null, FieldInfo);
+					var castPropAccess = Expression.Convert(propAccess, typeof(object));
+					var lambda = Expression.Lambda<Func<object, object>>(castPropAccess, paramExp);
+					Interlocked.Exchange(ref m_OptimizedGetter, lambda.Compile());
+				}
+				else
+				{
+					var paramExp = Expression.Parameter(typeof(object), "obj");
+					var castParamExp = Expression.Convert(paramExp, this.FieldInfo.DeclaringType);
+					var propAccess = Expression.Field(castParamExp, FieldInfo);
+					var castPropAccess = Expression.Convert(propAccess, typeof(object));
+					var lambda = Expression.Lambda<Func<object, object>>(castPropAccess, paramExp);
+					Interlocked.Exchange(ref m_OptimizedGetter, lambda.Compile());
+				}
+			}
+		}
+
+		/// <summary>
+		/// Sets the value of the property
+		/// </summary>
+		/// <param name="script">The script.</param>
+		/// <param name="obj">The object.</param>
+		/// <param name="v">The value to set.</param>
+		public void SetValue(Script script, object obj, DynValue v)
+		{
+			object value = ScriptToClrConversions.DynValueToObjectOfType(v, this.FieldInfo.FieldType, null, false);
+
+			try
+			{
+				if (value is double)
+					value = NumericConversions.DoubleToType(FieldInfo.FieldType, (double)value);
+
+				FieldInfo.SetValue(IsStatic ? null : obj, value);
+			}
+			catch (ArgumentException)
+			{
+				// non-optimized setters fall here
+				throw ScriptRuntimeException.UserDataArgumentTypeMismatch(v.Type, FieldInfo.FieldType);
+			}
+			catch (InvalidCastException)
+			{
+				// optimized setters fall here
+				throw ScriptRuntimeException.UserDataArgumentTypeMismatch(v.Type, FieldInfo.FieldType);
+			}
+		}
+
+		/// <summary>
+		/// Gets the getter of the property as a DynValue containing a callback
+		/// </summary>
+		/// <param name="script">The script.</param>
+		/// <param name="obj">The object.</param>
+		/// <returns></returns>
+		public DynValue GetGetterCallbackAsDynValue(Script script, object obj)
+		{
+			return DynValue.NewCallback((p1, p2) => GetValue(script, obj));
+		}
+	}
+}

+ 7 - 2
src/MoonSharp.Interpreter/Interop/StandardDescriptors/StandardUserDataOverloadedMethodDescriptor.cs

@@ -44,8 +44,10 @@ namespace MoonSharp.Interpreter.Interop
 		}
 
 		/// <summary>
-		/// Initializes a new instance of the <see cref="StandardUserDataOverloadedMethodDescriptor"/> class.
+		/// Initializes a new instance of the <see cref="StandardUserDataOverloadedMethodDescriptor" /> class.
 		/// </summary>
+		/// <param name="name">The name.</param>
+		/// <param name="declaringType">The declaring type.</param>
 		/// <param name="descriptor">The descriptor of the first overloaded method.</param>
 		public StandardUserDataOverloadedMethodDescriptor(string name, Type declaringType, StandardUserDataMethodDescriptor descriptor)
 			: this(name, declaringType)
@@ -54,8 +56,10 @@ namespace MoonSharp.Interpreter.Interop
 		}
 
 		/// <summary>
-		/// Initializes a new instance of the <see cref="StandardUserDataOverloadedMethodDescriptor"/> class.
+		/// Initializes a new instance of the <see cref="StandardUserDataOverloadedMethodDescriptor" /> class.
 		/// </summary>
+		/// <param name="name">The name.</param>
+		/// <param name="declaringType">The declaring type.</param>
 		/// <param name="descriptors">The descriptors of the overloaded methods.</param>
 		public StandardUserDataOverloadedMethodDescriptor(string name, Type declaringType, IEnumerable<StandardUserDataMethodDescriptor> descriptors)
 			: this(name, declaringType)
@@ -264,6 +268,7 @@ namespace MoonSharp.Interpreter.Interop
 		/// <param name="context">The context.</param>
 		/// <param name="args">The arguments.</param>
 		/// <param name="method">The method.</param>
+		/// <param name="isExtMethod">if set to <c>true</c>, is an extension method.</param>
 		/// <returns></returns>
 		private int CalcScoreForOverload(ScriptExecutionContext context, CallbackArguments args, StandardUserDataMethodDescriptor method, bool isExtMethod)
 		{

+ 2 - 0
src/MoonSharp.Interpreter/MoonSharp.Interpreter.net35-client.csproj

@@ -121,6 +121,7 @@
     <Compile Include="Interop\Converters\TableConversions.cs" />
     <Compile Include="Interop\CustomConvertersCollection.cs" />
     <Compile Include="Interop\StandardDescriptors\StandardUserDataOverloadedMethodDescriptor.cs" />
+    <Compile Include="Interop\StandardDescriptors\StandardUserDataFieldDescriptor.cs" />
     <Compile Include="IO\BinDumpBinaryReader.cs" />
     <Compile Include="IO\BinDumpBinaryWriter.cs">
       <SubType>Code</SubType>
@@ -226,6 +227,7 @@
     <Compile Include="Loaders\EmbeddedResourcesScriptLoader.cs" />
     <Compile Include="Loaders\FileSystemScriptLoader.cs" />
     <Compile Include="Loaders\InvalidScriptLoader.cs" />
+    <Compile Include="REPL\ReplHistoryNavigator.cs" />
     <Compile Include="REPL\ReplInterpreterScriptLoader.cs" />
     <Compile Include="Loaders\ScriptLoaderBase.cs" />
     <Compile Include="Loaders\IScriptLoader.cs" />

+ 9 - 0
src/MoonSharp.Interpreter/NameSpace_XmlHelp.cs

@@ -83,6 +83,15 @@ namespace MoonSharp.Interpreter.Platforms
 	internal static class NamespaceDoc { }
 }
 
+namespace MoonSharp.Interpreter.REPL
+{
+	/// <summary>
+	/// Contains classes useful to implement REPL interpreters.
+	/// See : <see href="http://en.wikipedia.org/wiki/Read%E2%80%93eval%E2%80%93print_loop" />
+	/// </summary>
+	internal static class NamespaceDoc { }
+}
+
 
 
 

+ 77 - 0
src/MoonSharp.Interpreter/REPL/ReplHistoryNavigator.cs

@@ -0,0 +1,77 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace MoonSharp.Interpreter.REPL
+{
+	/// <summary>
+	/// An implementation of <see cref="ReplInterpreter"/> which supports a very basic history of recent input lines.
+	/// </summary>
+	public class ReplHistoryInterpreter : ReplInterpreter
+	{
+		string[] m_History;
+		int m_Last = -1;
+		int m_Navi = -1;
+
+		/// <summary>
+		/// Initializes a new instance of the <see cref="ReplHistoryInterpreter"/> class.
+		/// </summary>
+		/// <param name="script">The script.</param>
+		/// <param name="historySize">Size of the history.</param>
+		public ReplHistoryInterpreter(Script script, int historySize)
+			: base(script)
+		{
+			m_History = new string[historySize];
+		}
+
+
+		/// <summary>
+		/// Evaluate a REPL command.
+		/// This method returns the result of the computation, or null if more input is needed for having valid code.
+		/// In case of errors, exceptions are propagated to the caller.
+		/// </summary>
+		/// <param name="input">The input.</param>
+		/// <returns>
+		/// This method returns the result of the computation, or null if more input is needed for a computation.
+		/// </returns>
+		public override DynValue Evaluate(string input)
+		{
+			m_Navi = -1;
+			m_Last = (m_Last + 1) % m_History.Length;
+			m_History[m_Last] = input;
+			return base.Evaluate(input);
+		}
+
+		/// <summary>
+		/// Gets the previous item in history, or null
+		/// </summary>
+		public string HistoryPrev()
+		{
+			if (m_Navi == -1)
+				m_Navi = m_Last;
+			else
+				m_Navi = ((m_Navi - 1) + m_History.Length) % m_History.Length;
+
+			if (m_Navi >= 0) return m_History[m_Navi];
+			return null;
+		}
+
+		/// <summary>
+		/// Gets the next item in history, or null
+		/// </summary>
+		public string HistoryNext()
+		{
+			if (m_Navi == -1)
+				return null;
+			else
+				m_Navi = (m_Navi + 1) % m_History.Length;
+
+			if (m_Navi >= 0) return m_History[m_Navi];
+			return null;
+		}
+
+
+
+	}
+}

+ 6 - 6
src/MoonSharp.Interpreter/REPL/ReplInterpreter.cs

@@ -37,26 +37,26 @@ namespace MoonSharp.Interpreter.REPL
 		/// <summary>
 		/// Gets a value indicating whether this instance has a pending command 
 		/// </summary>
-		public bool HasPendingCommand { get { return m_CurrentCommand.Length > 0; } }
+		public virtual bool HasPendingCommand { get { return m_CurrentCommand.Length > 0; } }
 
 		/// <summary>
 		/// Gets the current pending command.
 		/// </summary>
-		public string CurrentPendingCommand { get { return m_CurrentCommand; } }
+		public virtual string CurrentPendingCommand { get { return m_CurrentCommand; } }
 
 		/// <summary>
 		/// Gets the classic prompt (">" or ">>") given the current state of the interpreter
 		/// </summary>
-		public string ClassicPrompt { get { return HasPendingCommand ? ">>" : ">"; } }
+		public virtual string ClassicPrompt { get { return HasPendingCommand ? ">>" : ">"; } }
 
 		/// <summary>
-		/// Executes a REPL command.
-		/// This method returns the result of the computation, or null if more input is needed for a computation.
+		/// Evaluate a REPL command.
+		/// This method returns the result of the computation, or null if more input is needed for having valid code.
 		/// In case of errors, exceptions are propagated to the caller.
 		/// </summary>
 		/// <param name="input">The input.</param>
 		/// <returns>This method returns the result of the computation, or null if more input is needed for a computation.</returns>
-		public DynValue ExecuteRepl(string input)
+		public virtual DynValue Evaluate(string input)
 		{
 			bool isFirstLine = !HasPendingCommand;
 

+ 1 - 1
src/MoonSharp.Interpreter/Script.cs

@@ -28,7 +28,7 @@ namespace MoonSharp.Interpreter
 		/// <summary>
 		/// The version of the MoonSharp engine
 		/// </summary>
-		public const string VERSION = "0.9.1.0"; 
+		public const string VERSION = "0.9.2.0"; 
 
 		/// <summary>
 		/// The Lua version being supported

+ 3 - 1
src/MoonSharp.Interpreter/Tree/Expression_.cs

@@ -149,7 +149,9 @@ namespace MoonSharp.Interpreter.Tree
 					return new TableConstructor(lcontext);
 				case TokenType.Function:
 					lcontext.Lexer.Next();
-					return new FunctionDefinitionExpression(lcontext, false);
+					return new FunctionDefinitionExpression(lcontext, false, false);
+				case TokenType.Lambda:
+					return new FunctionDefinitionExpression(lcontext, false, true);
 				default:
 					return PrimaryExp(lcontext);
 			}

+ 29 - 12
src/MoonSharp.Interpreter/Tree/Expressions/FunctionDefinitionExpression.cs

@@ -26,24 +26,24 @@ namespace MoonSharp.Interpreter.Tree.Expressions
 
 
 		public FunctionDefinitionExpression(ScriptLoadingContext lcontext, Table globalContext)
-			: this(lcontext, false, globalContext)
+			: this(lcontext, false, globalContext, false)
 		{ }
 
-		public FunctionDefinitionExpression(ScriptLoadingContext lcontext, bool pushSelfParam)
-			: this(lcontext, pushSelfParam, null)
+		public FunctionDefinitionExpression(ScriptLoadingContext lcontext, bool pushSelfParam, bool isLambda)
+			: this(lcontext, pushSelfParam, null, isLambda)
 		{ }
 
 
-		private FunctionDefinitionExpression(ScriptLoadingContext lcontext, bool pushSelfParam, Table globalContext)
+		private FunctionDefinitionExpression(ScriptLoadingContext lcontext, bool pushSelfParam, Table globalContext, bool isLambda)
 			: base(lcontext)
 		{
 			if (globalContext != null)
 				CheckTokenType(lcontext, TokenType.Function);
 
-			// here lexer should be at the '('.
-			Token openRound = CheckTokenType(lcontext, TokenType.Brk_Open_Round);
+			// here lexer should be at the '(' or at the '|'
+			Token openRound = CheckTokenType(lcontext, isLambda ? TokenType.Lambda : TokenType.Brk_Open_Round);
 
-			List<string> paramnames = BuildParamList(lcontext, pushSelfParam, openRound);
+			List<string> paramnames = BuildParamList(lcontext, pushSelfParam, openRound, isLambda);
 			// here lexer is at first token of body
 
 			m_Begin = openRound.GetSourceRefUpTo(lcontext.Lexer.Current);
@@ -63,7 +63,10 @@ namespace MoonSharp.Interpreter.Tree.Expressions
 
 			m_ParamNames = DefineArguments(paramnames, lcontext);
 
-			m_Statement = CreateBody(lcontext);
+			if(isLambda)
+				m_Statement = CreateLambdaBody(lcontext);
+			else
+				m_Statement = CreateBody(lcontext);
 
 			m_StackFrame = lcontext.Scope.PopFunction();
 
@@ -72,6 +75,18 @@ namespace MoonSharp.Interpreter.Tree.Expressions
 
 		}
 
+
+		private Statement CreateLambdaBody(ScriptLoadingContext lcontext)
+		{
+			Token start = lcontext.Lexer.Current;
+			Expression e = Expression.Expr(lcontext);
+			Token end = lcontext.Lexer.Current;
+			SourceRef sref = start.GetSourceRefUpTo(end);
+			Statement s = new ReturnStatement(lcontext, e, sref);
+			return s;
+		}
+
+
 		private Statement CreateBody(ScriptLoadingContext lcontext)
 		{
 			Statement s = new CompositeStatement(lcontext);
@@ -88,15 +103,17 @@ namespace MoonSharp.Interpreter.Tree.Expressions
 			return s;
 		}
 
-		private List<string> BuildParamList(ScriptLoadingContext lcontext, bool pushSelfParam, Token openBracketToken)
+		private List<string> BuildParamList(ScriptLoadingContext lcontext, bool pushSelfParam, Token openBracketToken, bool isLambda)
 		{
+			TokenType closeToken = isLambda ? TokenType.Lambda : TokenType.Brk_Close_Round;
+
 			List<string> paramnames = new List<string>();
 
 			// method decls with ':' must push an implicit 'self' param
 			if (pushSelfParam)
 				paramnames.Add("self");
 
-			while (lcontext.Lexer.Current.Type != TokenType.Brk_Close_Round)
+			while (lcontext.Lexer.Current.Type != closeToken)
 			{
 				Token t = lcontext.Lexer.Current;
 
@@ -122,12 +139,12 @@ namespace MoonSharp.Interpreter.Tree.Expressions
 				}
 				else
 				{
-					CheckMatch(lcontext, openBracketToken, TokenType.Brk_Close_Round, ")");
+					CheckMatch(lcontext, openBracketToken, closeToken, isLambda ? "|" : ")");
 					break;
 				}
 			}
 
-			if (lcontext.Lexer.Current.Type == TokenType.Brk_Close_Round)
+			if (lcontext.Lexer.Current.Type == closeToken)
 				lcontext.Lexer.Next();
 
 			return paramnames;

+ 3 - 0
src/MoonSharp.Interpreter/Tree/Lexer/Lexer.cs

@@ -155,6 +155,9 @@ namespace MoonSharp.Interpreter.Tree
 
 			switch (c)
 			{
+				case '|':
+					CursorCharNext();
+					return CreateToken(TokenType.Lambda, fromLine, fromCol, "|");
 				case ';':
 					CursorCharNext();
 					return CreateToken(TokenType.SemiColon, fromLine, fromCol, ";");

+ 1 - 0
src/MoonSharp.Interpreter/Tree/Lexer/TokenType.cs

@@ -19,6 +19,7 @@ namespace MoonSharp.Interpreter.Tree
 		False,
 		For,
 		Function,
+		Lambda,
 		Goto,
 		If,
 		In,

+ 1 - 1
src/MoonSharp.Interpreter/Tree/Statements/FunctionDefinitionStatement.cs

@@ -86,7 +86,7 @@ namespace MoonSharp.Interpreter.Tree.Statements
 				}
 			}
 
-			m_FuncDef = new FunctionDefinitionExpression(lcontext, m_IsMethodCallingConvention);
+			m_FuncDef = new FunctionDefinitionExpression(lcontext, m_IsMethodCallingConvention, false);
 			lcontext.Source.Refs.Add(m_SourceRef);
 		}
 

+ 11 - 0
src/MoonSharp.Interpreter/Tree/Statements/ReturnStatement.cs

@@ -14,6 +14,17 @@ namespace MoonSharp.Interpreter.Tree.Statements
 		Expression m_Expression = null;
 		SourceRef m_Ref;
 
+		public ReturnStatement(ScriptLoadingContext lcontext, Expression e, SourceRef sref)
+			: base(lcontext)
+		{
+			m_Expression = e;
+			m_Ref = sref;
+			lcontext.Source.Refs.Add(sref);
+		}
+
+
+
+
 		public ReturnStatement(ScriptLoadingContext lcontext)
 			: base(lcontext)
 		{

+ 10 - 1
src/MoonSharp.Interpreter/_Projects/MoonSharp.Interpreter.net40-client/MoonSharp.Interpreter.net40-client.csproj

@@ -130,6 +130,9 @@
     <Compile Include="..\..\Interop\StandardDescriptors\StandardUserDataOverloadedMethodDescriptor.cs">
       <Link>StandardUserDataOverloadedMethodDescriptor.cs</Link>
     </Compile>
+    <Compile Include="..\..\Interop\StandardDescriptors\StandardUserDataFieldDescriptor.cs">
+      <Link>StandardUserDataFieldDescriptor.cs</Link>
+    </Compile>
     <Compile Include="..\..\IO\BinDumpBinaryReader.cs">
       <Link>BinDumpBinaryReader.cs</Link>
     </Compile>
@@ -405,7 +408,10 @@
     <Compile Include="..\..\Loaders\InvalidScriptLoader.cs">
       <Link>InvalidScriptLoader.cs</Link>
     </Compile>
-    <Compile Include="..\..\Loaders\ReplInterpreterScriptLoader.cs">
+    <Compile Include="..\..\REPL\ReplHistoryNavigator.cs">
+      <Link>ReplHistoryNavigator.cs</Link>
+    </Compile>
+    <Compile Include="..\..\REPL\ReplInterpreterScriptLoader.cs">
       <Link>ReplInterpreterScriptLoader.cs</Link>
     </Compile>
     <Compile Include="..\..\Loaders\ScriptLoaderBase.cs">
@@ -453,6 +459,9 @@
     <Compile Include="..\..\Platforms\PortableWrappers\Stopwatch.cs">
       <Link>Stopwatch.cs</Link>
     </Compile>
+    <Compile Include="..\..\REPL\ReplInterpreter.cs">
+      <Link>ReplInterpreter.cs</Link>
+    </Compile>
     <Compile Include="..\..\Script.cs">
       <Link>Script.cs</Link>
     </Compile>

+ 10 - 1
src/MoonSharp.Interpreter/_Projects/MoonSharp.Interpreter.portable40/MoonSharp.Interpreter.portable40.csproj

@@ -127,6 +127,9 @@
     <Compile Include="..\..\Interop\StandardDescriptors\StandardUserDataOverloadedMethodDescriptor.cs">
       <Link>StandardUserDataOverloadedMethodDescriptor.cs</Link>
     </Compile>
+    <Compile Include="..\..\Interop\StandardDescriptors\StandardUserDataFieldDescriptor.cs">
+      <Link>StandardUserDataFieldDescriptor.cs</Link>
+    </Compile>
     <Compile Include="..\..\IO\BinDumpBinaryReader.cs">
       <Link>BinDumpBinaryReader.cs</Link>
     </Compile>
@@ -402,7 +405,10 @@
     <Compile Include="..\..\Loaders\InvalidScriptLoader.cs">
       <Link>InvalidScriptLoader.cs</Link>
     </Compile>
-    <Compile Include="..\..\Loaders\ReplInterpreterScriptLoader.cs">
+    <Compile Include="..\..\REPL\ReplHistoryNavigator.cs">
+      <Link>ReplHistoryNavigator.cs</Link>
+    </Compile>
+    <Compile Include="..\..\REPL\ReplInterpreterScriptLoader.cs">
       <Link>ReplInterpreterScriptLoader.cs</Link>
     </Compile>
     <Compile Include="..\..\Loaders\ScriptLoaderBase.cs">
@@ -450,6 +456,9 @@
     <Compile Include="..\..\Platforms\PortableWrappers\Stopwatch.cs">
       <Link>Stopwatch.cs</Link>
     </Compile>
+    <Compile Include="..\..\REPL\ReplInterpreter.cs">
+      <Link>ReplInterpreter.cs</Link>
+    </Compile>
     <Compile Include="..\..\Script.cs">
       <Link>Script.cs</Link>
     </Compile>

+ 1 - 1
src/MoonSharp/Program.cs

@@ -66,7 +66,7 @@ namespace MoonSharp
 
 					try
 					{
-						DynValue result = interpreter.ExecuteRepl(s);
+						DynValue result = interpreter.Evaluate(s);
 
 						if (result != null && result.Type != DataType.Void)
 							Console.WriteLine("{0}", result);

+ 18 - 0
src/moonsharp.sln

@@ -57,6 +57,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SilverlightTestRunner", "Te
 EndProject
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MoonSharp.RemoteDebugger.net40-client", "MoonSharp.RemoteDebugger\_Projects\MoonSharp.RemoteDebugger.net40-client\MoonSharp.RemoteDebugger.net40-client.csproj", "{F9D383B9-2639-4738-A897-4D9F8801B8C9}"
 EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MoonSharpSL5ReplDemo", "DevTools\MoonSharpSL5ReplDemo\MoonSharpSL5ReplDemo.csproj", "{69B110B4-E578-4854-8F63-D80E4E14E1B6}"
+EndProject
 Global
 	GlobalSection(SolutionConfigurationPlatforms) = preSolution
 		Debug|Any CPU = Debug|Any CPU
@@ -383,6 +385,21 @@ Global
 		{F9D383B9-2639-4738-A897-4D9F8801B8C9}.Release|ARM.ActiveCfg = Release|Any CPU
 		{F9D383B9-2639-4738-A897-4D9F8801B8C9}.Release|x64.ActiveCfg = Release|Any CPU
 		{F9D383B9-2639-4738-A897-4D9F8801B8C9}.Release|x86.ActiveCfg = Release|Any CPU
+		{69B110B4-E578-4854-8F63-D80E4E14E1B6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{69B110B4-E578-4854-8F63-D80E4E14E1B6}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{69B110B4-E578-4854-8F63-D80E4E14E1B6}.Debug|ARM.ActiveCfg = Debug|Any CPU
+		{69B110B4-E578-4854-8F63-D80E4E14E1B6}.Debug|x64.ActiveCfg = Debug|Any CPU
+		{69B110B4-E578-4854-8F63-D80E4E14E1B6}.Debug|x86.ActiveCfg = Debug|Any CPU
+		{69B110B4-E578-4854-8F63-D80E4E14E1B6}.Dev|Any CPU.ActiveCfg = Debug|Any CPU
+		{69B110B4-E578-4854-8F63-D80E4E14E1B6}.Dev|Any CPU.Build.0 = Debug|Any CPU
+		{69B110B4-E578-4854-8F63-D80E4E14E1B6}.Dev|ARM.ActiveCfg = Debug|Any CPU
+		{69B110B4-E578-4854-8F63-D80E4E14E1B6}.Dev|x64.ActiveCfg = Debug|Any CPU
+		{69B110B4-E578-4854-8F63-D80E4E14E1B6}.Dev|x86.ActiveCfg = Debug|Any CPU
+		{69B110B4-E578-4854-8F63-D80E4E14E1B6}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{69B110B4-E578-4854-8F63-D80E4E14E1B6}.Release|Any CPU.Build.0 = Release|Any CPU
+		{69B110B4-E578-4854-8F63-D80E4E14E1B6}.Release|ARM.ActiveCfg = Release|Any CPU
+		{69B110B4-E578-4854-8F63-D80E4E14E1B6}.Release|x64.ActiveCfg = Release|Any CPU
+		{69B110B4-E578-4854-8F63-D80E4E14E1B6}.Release|x86.ActiveCfg = Release|Any CPU
 	EndGlobalSection
 	GlobalSection(SolutionProperties) = preSolution
 		HideSolutionNode = FALSE
@@ -406,5 +423,6 @@ Global
 		{642B8AC9-97EB-4AA8-8F1D-D3F94CABCE37} = {023F1F7D-5F49-430F-9CC4-5FF891439548}
 		{6D867B0C-EFC6-48C8-972C-EE0A2F99FEB4} = {023F1F7D-5F49-430F-9CC4-5FF891439548}
 		{F9D383B9-2639-4738-A897-4D9F8801B8C9} = {5014C740-F6C7-4995-8D40-C250FB159A20}
+		{69B110B4-E578-4854-8F63-D80E4E14E1B6} = {3C626068-E8CE-4F62-8974-F42A56F4EFD3}
 	EndGlobalSection
 EndGlobal