public object VisitWhileStatement(WhileStatementAst whileStatementAst)
 {
     this.GenerateWhileLoop(whileStatementAst.Label, delegate {
         whileStatementAst.Condition.Accept(this);
     }, delegate {
         whileStatementAst.Body.Accept(this);
     }, null);
     return(null);
 }
Exemple #2
0
    public System.Object VisitWhileStatement(System.Management.Automation.Language.WhileStatementAst whileStatementAst)
    {
        IScriptExtent mappedExtent = MapExtent(whileStatementAst.Extent);

        PipelineBaseAst   mappedCondition = _VisitPipelineBase(whileStatementAst.Condition);
        StatementBlockAst mappedBody      = (StatementBlockAst)VisitStatementBlock(whileStatementAst.Body);

        return(new WhileStatementAst(mappedExtent, whileStatementAst.Label, mappedCondition, mappedBody));
    }
Exemple #3
0
 public override AstVisitAction VisitWhileStatement(WhileStatementAst ast) { return CheckParent(ast); }
 public object VisitWhileStatement(WhileStatementAst whileStatementAst)
 {
     return(false);
 }
 public object VisitWhileStatement(WhileStatementAst whileStatementAst)
 {
     throw PSTraceSource.NewArgumentException("ast");
 }
Exemple #6
0
 public override AstVisitAction VisitWhileStatement(WhileStatementAst ast)
 {
     return(Check(ast));
 }
Exemple #7
0
 public override AstVisitAction VisitWhileStatement(WhileStatementAst whileStatementAst)
 {
     throw new NotImplementedException(); //VisitWhileStatement(whileStatementAst);
 }
Exemple #8
0
 public override AstVisitAction VisitWhileStatement(WhileStatementAst whileStatementAst)
 {
     /* The controlling expression while-condition must have type bool or
      * be implicitly convertible to that type. The loop body, which
      * consists of statement-block, is executed repeatedly while the
      * controlling expression tests True. The controlling expression
      * is evaluated before each execution of the loop body.
      */
     return VisitSimpleLoopStatement(whileStatementAst.Body, whileStatementAst.Condition, false, false);
 }
Exemple #9
0
 public override AstVisitAction VisitWhileStatement(WhileStatementAst ast)
 {
     return this.Check(ast);
 }
 public override AstVisitAction VisitWhileStatement(WhileStatementAst whileStatementAst)
 {
     this.ReportError(whileStatementAst, () => ParserStrings.ForWhileStatementNotSupportedInDataSection, new object[0]);
     return(AstVisitAction.Continue);
 }
 public object VisitWhileStatement(WhileStatementAst whileStatementAst) { throw new UnexpectedElementException(); }
Exemple #12
0
 /// <summary/>
 public virtual AstVisitAction VisitWhileStatement(WhileStatementAst whileStatementAst) => DefaultVisit(whileStatementAst);
Exemple #13
0
 public object VisitWhileStatement(WhileStatementAst whileStatementAst)
 {
     return this.GenerateWhileLoop(whileStatementAst.Label, () => Expression.Block(this.UpdatePosition(whileStatementAst.Condition), this.CaptureStatementResults(whileStatementAst.Condition, CaptureAstContext.Condition, null)), delegate (List<Expression> loopBody, LabelTarget breakTarget, LabelTarget continueTarget) {
         loopBody.Add(this.Compile(whileStatementAst.Body));
     }, null);
 }
Exemple #14
0
 public override AstVisitAction VisitWhileStatement(WhileStatementAst whileStatementAst) { return AstVisitAction.SkipChildren; }
Exemple #15
0
 /// <summary/>
 public virtual object VisitWhileStatement(WhileStatementAst whileStatementAst) { return null; }
        /// <summary>
        /// Visit while statement
        /// </summary>
        /// <param name="whileStatementAst"></param>
        /// <returns></returns>
        public object VisitWhileStatement(WhileStatementAst whileStatementAst)
        {
            if (whileStatementAst == null) return null;

            GenerateWhileLoop(whileStatementAst.Label,
                              () => whileStatementAst.Condition.Visit(this.Decorator),
                              () => whileStatementAst.Body.Visit(this.Decorator));
            return null;
        }
 /// <summary/>
 public virtual object VisitWhileStatement(WhileStatementAst whileStatementAst)
 {
     return _decorated.VisitWhileStatement(whileStatementAst);
 }
Exemple #18
0
 public object VisitWhileStatement(WhileStatementAst whileStatementAst) { return AutomationNull.Value; }
Exemple #19
0
 public object VisitWhileStatement(WhileStatementAst whileStatementAst) { throw PSTraceSource.NewArgumentException("ast"); }
Exemple #20
0
 public object VisitWhileStatement(WhileStatementAst whileStatementAst)
 {
     return GenerateWhileLoop(whileStatementAst.Label,
                              () => Expression.Block(UpdatePosition(whileStatementAst.Condition),
                                                     CaptureStatementResults(whileStatementAst.Condition, CaptureAstContext.Condition)),
                              (loopBody, breakTarget, continueTarget) => loopBody.Add(Compile(whileStatementAst.Body)));
 }
Exemple #21
0
 public virtual AstVisitAction VisitWhileStatement(WhileStatementAst whileStatementAst)
 {
     return AstVisitAction.Continue;
 }
Exemple #22
0
 public object VisitWhileStatement(WhileStatementAst whileStatementAst)
 {
     GenerateWhileLoop(whileStatementAst.Label,
                       () => whileStatementAst.Condition.Accept(this),
                       () => whileStatementAst.Body.Accept(this));
     return null;
 }
Exemple #23
0
 /// <summary/>
 public virtual object VisitWhileStatement(WhileStatementAst whileStatementAst)
 {
     return(null);
 }
 public override AstVisitAction VisitWhileStatement(WhileStatementAst whileStatementAst)
 {
     this.ReportError(whileStatementAst, () => ParserStrings.ForWhileStatementNotSupportedInDataSection, new object[0]);
     return AstVisitAction.Continue;
 }
 public object VisitWhileStatement(WhileStatementAst whileStatementAst)
 {
     return false;
 }
Exemple #26
0
        public override AstVisitAction VisitWhileStatement(WhileStatementAst whileStatementAst)
        {
            /* The controlling expression while-condition must have type bool or
             * be implicitly convertible to that type. The loop body, which
             * consists of statement-block, is executed repeatedly while the
             * controlling expression tests True. The controlling expression
             * is evaluated before each execution of the loop body.
             */
            while ((bool)((PSObject)EvaluateAst(whileStatementAst.Condition)).BaseObject)
            {
                this._pipelineCommandRuntime.WriteObject(EvaluateAst(whileStatementAst.Body, false), true);
            }

            return AstVisitAction.SkipChildren;
        }
Exemple #27
0
 /// <summary/>
 public virtual AstVisitAction VisitWhileStatement(WhileStatementAst whileStatementAst)
 {
     return(AstVisitAction.Continue);
 }
Exemple #28
0
 public object VisitWhileStatement(WhileStatementAst whileStatementAst)
 {
     this.GenerateWhileLoop(whileStatementAst.Label, delegate {
         whileStatementAst.Condition.Accept(this);
     }, delegate {
         whileStatementAst.Body.Accept(this);
     }, null);
     return null;
 }
 public object VisitWhileStatement(WhileStatementAst whileStatementAst)
 {
     return(AutomationNull.Value);
 }
 public object VisitWhileStatement(WhileStatementAst whileStatementAst)
 {
     throw new NotImplementedException();
 }