public System.Object VisitSubExpression(System.Management.Automation.Language.SubExpressionAst subExpressionAst) { IScriptExtent mappedExtent = MapExtent(subExpressionAst.Extent); StatementBlockAst mappedStatementBlock = (StatementBlockAst)VisitStatementBlock(subExpressionAst.SubExpression); return(new SubExpressionAst(mappedExtent, mappedStatementBlock)); }
public override AstVisitAction VisitSubExpression(SubExpressionAst subExpressionAst) { object[] results = (from statementAst in subExpressionAst.SubExpression.Statements let result = EvaluateAst(statementAst, false) where result != null select result).ToArray(); if (results.Length == 1) { _pipelineCommandRuntime.WriteObject(results.Single()); } else if (results.Length > 0) { _pipelineCommandRuntime.WriteObject(results); } return AstVisitAction.SkipChildren; }
/// <summary/> public virtual object VisitSubExpression(SubExpressionAst subExpressionAst) { return _decorated.VisitSubExpression(subExpressionAst); }
public override AstVisitAction VisitSubExpression(SubExpressionAst ast) { return CheckParent(ast); }
public object VisitSubExpression(SubExpressionAst subExpressionAst) { return(subExpressionAst.SubExpression.Accept(this)); }
public object VisitSubExpression(SubExpressionAst subExpressionAst) { return subExpressionAst.SubExpression.Accept(this); }
/// <summary/> public virtual object VisitSubExpression(SubExpressionAst subExpressionAst) { return(null); }
public virtual AstVisitAction VisitSubExpression(SubExpressionAst subExpressionAst) { return AstVisitAction.Continue; }
public override AstVisitAction VisitSubExpression(SubExpressionAst subExpressionAst) { return(AstVisitAction.Continue); }
public object VisitSubExpression(SubExpressionAst subExpressionAst) { throw new UnexpectedElementException(); }
public override AstVisitAction VisitSubExpression(SubExpressionAst subExpressionAst) { // Sub expression is allowed if the statement block is allowed. return AstVisitAction.Continue; }
public virtual AstVisitAction VisitSubExpression(SubExpressionAst subExpressionAst) => DefaultVisit(subExpressionAst);
public object VisitSubExpression(SubExpressionAst subExpressionAst) { if (!subExpressionAst.SubExpression.Statements.Any<StatementAst>()) { return ExpressionCache.NullConstant; } return this.CaptureAstResults(subExpressionAst.SubExpression, CaptureAstContext.Assignment, null); }
/// <summary/> public virtual object VisitSubExpression(SubExpressionAst subExpressionAst) { return null; }
public override AstVisitAction VisitSubExpression(SubExpressionAst ast) { return this.Check(ast); }
public override AstVisitAction VisitSubExpression(SubExpressionAst subExpressionAst) { throw new NotImplementedException(); //VisitSubExpression(subExpressionAst); }
public object VisitSubExpression(SubExpressionAst subExpressionAst) { CheckIsConstant(subExpressionAst, "Caller to verify ast is constant"); return subExpressionAst.SubExpression.Accept(this); }
public object VisitSubExpression(SubExpressionAst subExpressionAst) { subExpressionAst.SubExpression.Accept(this); return(null); }
public object VisitSubExpression(SubExpressionAst subExpressionAst) { if (subExpressionAst.SubExpression.Statements.Count == 0) { // This seems wrong, but is compatible with V2. return ExpressionCache.NullConstant; } // SubExpression and ParenExpression are two special cases for handling the partial output while exception // is thrown. For example, the output of $(1; throw 2) should be 1 and the error record with message '2'; // but the output of $(1; throw 2).Length should just be the error record with message '2'. bool shouldPreserveResultInCaseofException = subExpressionAst.ShouldPreserveOutputInCaseOfException(); return CaptureAstResults(subExpressionAst.SubExpression, shouldPreserveResultInCaseofException ? CaptureAstContext.AssignmentWithResultPreservation : CaptureAstContext.AssignmentWithoutResultPreservation); }
public override AstVisitAction VisitSubExpression(SubExpressionAst ast) { return(Check(ast)); }
public override AstVisitAction VisitSubExpression(SubExpressionAst subExpressionAst) { return AstVisitAction.Continue; }
public virtual AstVisitAction VisitSubExpression(SubExpressionAst subExpressionAst) { return(AstVisitAction.Continue); }
/// <summary> /// Visit sub expression /// </summary> /// <param name="subExpressionAst"></param> /// <returns></returns> public object VisitSubExpression(SubExpressionAst subExpressionAst) { if (subExpressionAst == null) return null; subExpressionAst.SubExpression.Visit(this.Decorator); return null; }
public object VisitSubExpression(SubExpressionAst subExpressionAst) { CheckIsConstant(subExpressionAst, "Caller to verify ast is constant"); return(subExpressionAst.SubExpression.Accept(this)); }
public object VisitSubExpression(SubExpressionAst subExpressionAst) { throw new NotImplementedException(); }