public System.Object VisitExitStatement(System.Management.Automation.Language.ExitStatementAst exitStatementAst) { IScriptExtent mappedExtent = MapExtent(exitStatementAst.Extent); PipelineBaseAst mappedPipeline = _VisitPipelineBase(exitStatementAst.Pipeline); return(new ExitStatementAst(mappedExtent, mappedPipeline)); }
public override AstVisitAction VisitExitStatement(ExitStatementAst ast) { return CheckParent(ast); }
public object VisitExitStatement(ExitStatementAst exitStatementAst) { return(false); }
public object VisitExitStatement(ExitStatementAst exitStatementAst) { throw PSTraceSource.NewArgumentException("ast"); }
public override AstVisitAction VisitExitStatement(ExitStatementAst ast) { return(Check(ast)); }
public object VisitExitStatement(ExitStatementAst exitStatementAst) { this.ControlFlowStatement(exitStatementAst.Pipeline); return(null); }
public override AstVisitAction VisitExitStatement(ExitStatementAst exitStatementAst) { throw new NotImplementedException(); //VisitExitStatement(exitStatementAst); }
public override AstVisitAction VisitExitStatement(ExitStatementAst ast) { return this.Check(ast); }
public object VisitExitStatement(ExitStatementAst exitStatementAst) { throw new UnexpectedElementException(); }
public override AstVisitAction VisitExitStatement(ExitStatementAst exitStatementAst) { this.ReportError(exitStatementAst, () => ParserStrings.FlowControlStatementNotSupportedInDataSection, new object[0]); return(AstVisitAction.Continue); }
/// <summary/> public virtual AstVisitAction VisitExitStatement(ExitStatementAst exitStatementAst) => DefaultVisit(exitStatementAst);
public object VisitExitStatement(ExitStatementAst exitStatementAst) { Expression expr = (exitStatementAst.Pipeline != null) ? this.CaptureStatementResults(exitStatementAst.Pipeline, CaptureAstContext.Assignment, null) : ExpressionCache.Constant(0); return Expression.Block(this.UpdatePosition(exitStatementAst), Expression.Throw(Expression.Call(CachedReflectionInfo.PipelineOps_GetExitException, expr.Convert(typeof(object))), typeof(void))); }
/// <summary/> public virtual object VisitExitStatement(ExitStatementAst exitStatementAst) { return null; }
/// <summary/> public virtual object VisitExitStatement(ExitStatementAst exitStatementAst) { return _decorated.VisitExitStatement(exitStatementAst); }
public object VisitExitStatement(ExitStatementAst exitStatementAst) { return AutomationNull.Value; }
public override AstVisitAction VisitExitStatement(ExitStatementAst exitStatementAst) { object arg = exitStatementAst.Pipeline == null ? null : EvaluateAst(exitStatementAst.Pipeline, false); throw new ExitException(arg); }
public override AstVisitAction VisitExitStatement(ExitStatementAst exitStatementAst) { if (exitStatementAst.Pipeline == null) throw new ReturnException(); throw new NotImplementedException(); //VisitExitStatement(exitStatementAst); }
public object VisitExitStatement(ExitStatementAst exitStatementAst) { // We should not preserve the partial output if exception is thrown when evaluating exitStmt.pipeline. Expression exitCode = exitStatementAst.Pipeline != null ? CaptureStatementResults(exitStatementAst.Pipeline, CaptureAstContext.AssignmentWithoutResultPreservation) : ExpressionCache.Constant(0); return Expression.Block( UpdatePosition(exitStatementAst), Expression.Throw(Expression.Call(CachedReflectionInfo.PipelineOps_GetExitException, exitCode.Convert(typeof(object))), typeof(void))); }
// TODO: public virtual AstVisitAction VisitErrorExpression(ErrorExpressionAst errorExpressionAst){return AstVisitAction.Continue; } // TODO: public virtual AstVisitAction VisitErrorStatement(ErrorStatementAst errorStatementAst){return AstVisitAction.Continue; } public virtual AstVisitAction VisitExitStatement(ExitStatementAst exitStatementAst) { return AstVisitAction.Continue; }
public override AstVisitAction VisitExitStatement(ExitStatementAst exitStatementAst) { this.ReportError(exitStatementAst, () => ParserStrings.FlowControlStatementNotSupportedInDataSection, new object[0]); return AstVisitAction.Continue; }
/// <summary/> public virtual object VisitExitStatement(ExitStatementAst exitStatementAst) { return(null); }
public override AstVisitAction VisitExitStatement(ExitStatementAst exitStatementAst) { int exitCode = 0; if (exitStatementAst.Pipeline != null) { var value = EvaluateAst(exitStatementAst.Pipeline, false); // Default PS behavior: either convert value to int or it's 0 (see above) LanguagePrimitives.TryConvertTo<int>(value, out exitCode); } throw new ExitException(exitCode); }
public object VisitExitStatement(ExitStatementAst exitStatementAst) { return false; }
public object VisitExitStatement(ExitStatementAst exitStatementAst) { this.ControlFlowStatement(exitStatementAst.Pipeline); return null; }
/// <summary/> public virtual AstVisitAction VisitExitStatement(ExitStatementAst exitStatementAst) { return(AstVisitAction.Continue); }
/// <summary> /// Visit exit statement /// </summary> /// <param name="exitStatementAst"></param> /// <returns></returns> public object VisitExitStatement(ExitStatementAst exitStatementAst) { if (exitStatementAst == null) return null; ControlFlowStatement(exitStatementAst.Pipeline)._throws = true; return null; }
public object VisitExitStatement(ExitStatementAst exitStatementAst) { return(AutomationNull.Value); }
public object VisitExitStatement(ExitStatementAst exitStatementAst) { throw new NotImplementedException(); }