System.Management.Pash.Implementation.ExecutionVisitor.EvaluateLoopBodyAst C# (CSharp) Method

EvaluateLoopBodyAst() public method

public EvaluateLoopBodyAst ( Ast expressionAst, string loopLabel ) : bool
expressionAst Ast
loopLabel string
return bool
        public bool EvaluateLoopBodyAst(Ast expressionAst, string loopLabel)
        {
            var loopCanContinue = true;

            try
            {
                expressionAst.Visit(this);
            }
            catch (LoopFlowException e)
            {
                if (!String.IsNullOrEmpty(e.Label) && !e.Label.Equals(loopLabel))
                {
                    throw;
                }
                loopCanContinue = e is ContinueException;
            }

            // return if the loop can continue execution or should break
            return loopCanContinue;
        }
ExecutionVisitor