Ejemplo n.º 1
0
        public override void Excute(ExcutingStack stack)
        {
            DeclareExpression.Excute(stack);


            while (true)
            {
                if (_break)
                {
                    break;
                }


                CheckExpression.Excute(stack);



                if (!(bool)stack.Get(CheckExpression.Root))
                {
                    break;
                }

                Body.Excute(stack);


                OperateExpression.Excute(stack);
            }

            UnsetAll();
            _break = false;
        }
Ejemplo n.º 2
0
        public override void Excute(ExcutingStack stack)
        {
            GetCollectionExpression.Root.Excute(stack);

            var result = stack.Get(GetCollectionExpression.Root);


            if (result is JMappingObject jma)
            {
                Enumerabtor = jma.Instance as IEnumerator;

                while (Enumerabtor.MoveNext())
                {
                    if (_break)
                    {
                        break;
                    }

                    Reset(IteratorName, new JMappingObject(Enumerabtor.Current));

                    Body.Excute(stack);
                }
            }
            else if (result.Type == JType.Object)
            {
            }
            else
            {
                throw new CanNotCastToEnumerableException();
            }
        }
Ejemplo n.º 3
0
        public override void Excute(ExcutingStack stack)
        {
            CheckExpression.Excute(stack);

            var match = (bool)stack.Get(CheckExpression.Root);

            if (match)
            {
                Parent.SetMatchFound();
                Body.Excute(stack);
            }
        }
Ejemplo n.º 4
0
        public override void Excute(ExcutingStack stack)
        {
            CheckExpression.Excute(stack);

            var result = (bool)stack.Get(CheckExpression.Root);

            while (result)
            {
                if (_break)
                {
                    break;
                }

                Body.Excute(stack);

                CheckExpression.Excute(stack);

                result = (bool)stack.Get(CheckExpression.Root);
            }

            _break = false;
        }