So 3 things are required:
- pure IL/C# generation from script
- abilety to throw in C# classes and grammar constructs
- simple C# api
Generally I want api like this:
var sctipt = "Script...";
var scriptConstruct = "{0} \{ {1} \}";
ScriptCompiler.registerConstruct<Action<string, string> >(scriptConstruct);
ScriptCompiler.reginsterType(ClassT);
ScriptCompiler.bindFunction<Action<String> >(MyFunction, "FunctionNameInScript")
var CompiledScript = ScriptCompiler.Compile(sctipt);
CompiledScript.execute();
Is there any such Scripting language? I tried Nemerle but could not find how to work with it in the way I just described.