Ejemplo n.º 1
0
        public void Handler(CmsCodeGenerator generator)
        {
            var expressionStatmentHandler = new ExpressionStatmentHandler();

            expressionStatmentHandler.Handler(generator);

            var jfReference = (CmsCodeReference)CmsCodeFactory.JF(new CmsCode(generator.CodesLengh));

            generator.JFCodeReferenceStack.Push(jfReference);
            generator.AddCode(jfReference);

            generator.GeneratorState = TinyCodeGeneratorState.Initial;
        }
Ejemplo n.º 2
0
        public void Handler(CmsCodeGenerator generator)
        {
            var exp = new ExpressionStatmentHandler();

            exp.Handler(generator);

            var repeatStartReference = generator.RepeatReferenceStack.Pop();
            var jf  = (CmsCodeReference)CmsCodeFactory.JF(new CmsCode(generator.CodesLengh));
            var jmp = CmsCodeFactory.JMP(repeatStartReference);

            generator.AddCode(jf);
            generator.AddCode(jmp);

            jf.Reference.ValueDecimal = generator.CodesLengh;
            generator.GeneratorState  = TinyCodeGeneratorState.Initial;
        }
Ejemplo n.º 3
0
        public void Handler(CmsCodeGenerator generator)
        {
            var startWhileReference = new CmsCode(generator.CodesLengh);

            var expressionStatmentHandler = new ExpressionStatmentHandler();

            expressionStatmentHandler.Handler(generator);

            var cmsCodeReference = (CmsCodeReference)CmsCodeFactory.JF(new CmsCode(0X00));

            generator.JFCodeReferenceStack.Push(cmsCodeReference);
            generator.AddCode(cmsCodeReference);

            var commeBackWhile = (CmsCodeReference)CmsCodeFactory.JMP(startWhileReference);

            generator.StartWhileCodeReference.Push(commeBackWhile);

            generator.GeneratorState = TinyCodeGeneratorState.Initial;
        }