public override IAstNode VisitRepl([NotNull] ReplContext context) { var children = from child in context.children select child.Accept(this); return(new RootNode(context.GetSourceSpan( ), children)); }
public static ReplContext NewInstance(IActivationStrategy <ReplContext> strategy) { if (strategy == null) { throw new InvalidOperationException("Activation strategy cannot be null."); } var engine = Container.GetInstance() .Kernel.Get <ScriptEngine>(); var ctx = new ReplContext() { Id = Guid.NewGuid(), Session = engine.CreateSession() }; strategy.Activate(ctx); return(ctx); }