Esempio n. 1
0
 public object VisitWhileStatement(WhileStatementAst whileStatementAst)
 {
     this.GenerateWhileLoop(whileStatementAst.Label, delegate {
         whileStatementAst.Condition.Accept(this);
     }, delegate {
         whileStatementAst.Body.Accept(this);
     }, null);
     return(null);
 }
Esempio n. 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));
    }
Esempio n. 3
0
 public override AstVisitAction VisitWhileStatement(WhileStatementAst ast) { return CheckParent(ast); }
Esempio n. 4
0
 public object VisitWhileStatement(WhileStatementAst whileStatementAst)
 {
     return(false);
 }
Esempio n. 5
0
 public object VisitWhileStatement(WhileStatementAst whileStatementAst)
 {
     throw PSTraceSource.NewArgumentException("ast");
 }
Esempio n. 6
0
 public override AstVisitAction VisitWhileStatement(WhileStatementAst ast)
 {
     return(Check(ast));
 }
Esempio n. 7
0
 public override AstVisitAction VisitWhileStatement(WhileStatementAst whileStatementAst)
 {
     throw new NotImplementedException(); //VisitWhileStatement(whileStatementAst);
 }
Esempio n. 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);
 }
Esempio n. 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(); }
Esempio n. 12
0
 /// <summary/>
 public virtual AstVisitAction VisitWhileStatement(WhileStatementAst whileStatementAst) => DefaultVisit(whileStatementAst);
Esempio n. 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);
 }
Esempio n. 14
0
 public override AstVisitAction VisitWhileStatement(WhileStatementAst whileStatementAst) { return AstVisitAction.SkipChildren; }
Esempio n. 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);
 }
Esempio n. 18
0
 public object VisitWhileStatement(WhileStatementAst whileStatementAst) { return AutomationNull.Value; }
Esempio n. 19
0
 public object VisitWhileStatement(WhileStatementAst whileStatementAst) { throw PSTraceSource.NewArgumentException("ast"); }
Esempio n. 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)));
 }
Esempio n. 21
0
 public virtual AstVisitAction VisitWhileStatement(WhileStatementAst whileStatementAst)
 {
     return AstVisitAction.Continue;
 }
Esempio n. 22
0
 public object VisitWhileStatement(WhileStatementAst whileStatementAst)
 {
     GenerateWhileLoop(whileStatementAst.Label,
                       () => whileStatementAst.Condition.Accept(this),
                       () => whileStatementAst.Body.Accept(this));
     return null;
 }
Esempio n. 23
0
 /// <summary/>
 public virtual object VisitWhileStatement(WhileStatementAst whileStatementAst)
 {
     return(null);
 }
Esempio n. 24
0
 public override AstVisitAction VisitWhileStatement(WhileStatementAst whileStatementAst)
 {
     this.ReportError(whileStatementAst, () => ParserStrings.ForWhileStatementNotSupportedInDataSection, new object[0]);
     return AstVisitAction.Continue;
 }
Esempio n. 25
0
 public object VisitWhileStatement(WhileStatementAst whileStatementAst)
 {
     return false;
 }
Esempio n. 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;
        }
Esempio n. 27
0
 /// <summary/>
 public virtual AstVisitAction VisitWhileStatement(WhileStatementAst whileStatementAst)
 {
     return(AstVisitAction.Continue);
 }
Esempio n. 28
0
 public object VisitWhileStatement(WhileStatementAst whileStatementAst)
 {
     this.GenerateWhileLoop(whileStatementAst.Label, delegate {
         whileStatementAst.Condition.Accept(this);
     }, delegate {
         whileStatementAst.Body.Accept(this);
     }, null);
     return null;
 }
Esempio n. 29
0
 public object VisitWhileStatement(WhileStatementAst whileStatementAst)
 {
     return(AutomationNull.Value);
 }
 public object VisitWhileStatement(WhileStatementAst whileStatementAst)
 {
     throw new NotImplementedException();
 }