public void Handler(CmsCodeGenerator generator)
        {
            var exp = new ExpressionStatmentHandler();

            exp.Handler(generator);

            var token = generator.AttributionTokenStack.Pop();

            generator.AddCode(CmsCodeFactory.STO(generator.VariableArea[token.Value]));
            generator.GeneratorState = TinyCodeGeneratorState.Initial;
        }
Beispiel #2
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;
        }
        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;
        }
        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;
        }