Esempio 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;
        }
Esempio 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();
            }
        }
Esempio n. 3
0
        public override void Excute(ExcutingStack stack)
        {
            Declare(RETURN, new JObject());

            var newStack = ExcutingStackPool.Instance.Rent();

            Body.Excute(stack);

            ExcutingStackPool.Instance.Recycle(newStack);
        }
Esempio n. 4
0
        public override void Excute(ExcutingStack stack)
        {
            CheckExpression.Excute(stack);

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

            if (match)
            {
                Parent.SetMatchFound();
                Body.Excute(stack);
            }
        }
Esempio n. 5
0
        public override void Excute(ExcutingStack stack)
        {
            var newStack = ExcutingStackPool.Instance.Rent();

            foreach (var item in Children)
            {
                if (_break)
                {
                    break;
                }

                item.Excute(newStack);
            }

            ExcutingStackPool.Instance.Recycle(newStack);

            _break = false;
            UnsetAll();
        }
Esempio n. 6
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;
        }
Esempio n. 7
0
        public override void Excute(ExcutingStack stack)
        {
            foreach (var item in If0Blocks)
            {
                if (_isMatchFound)
                {
                    break;
                }



                item.Excute(stack);
            }

            if (!_isMatchFound && ElseBlock != null)
            {
                ElseBlock.Excute(stack);
            }

            _break        = false;
            _isMatchFound = false;
        }
Esempio n. 8
0
 public override void Excute(ExcutingStack stack)
 {
     throw new System.NotImplementedException();
 }
Esempio n. 9
0
 public override void Excute(ExcutingStack stack)
 {
     Root.Excute(stack);
 }
Esempio n. 10
0
 public override void Excute(ExcutingStack stack)
 {
     Body.Excute(stack);
 }