I'm new to language implementation and am playing around with a sample created by lionel Laske. My host code looks like this....
static void Main(string args)
// Create runtime
ScriptRuntime runtime = ScriptRuntime.Create();
// Load Engine
ScriptEngine engine = runtime.GetEngine(typeof(ADT.DLR.ADTLanguageContext));
ScriptScope scope = engine.CreateScope();
// Execute command
ScriptSource src = engine.CreateScriptSourceFromString("");
// Shutdown engine
How do I access 'testvar' when putting together the AST (ADT.DLR.ADTLanguageContext.ParseSourceCode)? I figured it would look something like:-
Expression testParam = program.CreateLocalVariable("testvar", typeof(Int32));
But it doesn't seem to pick up the value I set in the Host code. Any Ideas?
BTW, I did see this post... http://dlr.codeplex.com/Thread/View.aspx?ThreadId=54367 but I wasn't sure if it was relevant.