public override AstVisitAction VisitFunctionDefinition(FunctionDefinitionAst functionDefinitionAst) { var functionInfo = new /*FunctionInfo*/ ScriptInfo(functionDefinitionAst.Name, functionDefinitionAst.Body.GetScriptBlock()); // HACK: we shouldn't be casting this. But I'm too confused about runspace management in Pash. ((LocalRunspace)this._context.CurrentRunspace).CommandManager.SetFunction(functionInfo); return(AstVisitAction.SkipChildren); }
public override AstVisitAction VisitFunctionDefinition(FunctionDefinitionAst functionDefinitionAst) { var functionInfo = new /*FunctionInfo*/ScriptInfo(functionDefinitionAst.Name, functionDefinitionAst.Body.GetScriptBlock()); // HACK: we shouldn't be casting this. But I'm too confused about runspace management in Pash. ((LocalRunspace)this._context.CurrentRunspace).CommandManager.SetFunction(functionInfo); return AstVisitAction.SkipChildren; }