public static Object Run(this IInteractivity interactivity, Engine engine, String source) { var parser = engine.Parser; var scope = engine.Scope; var statements = parser.ParseStatements(source); var operations = statements.MakeRunnable(); var context = new ExecutionContext(operations, scope); using (interactivity.HandleCancellation(TriggerStop(context))) { context.Execute(); return(context.Pop()); } }