Ejemplo n.º 1
0
        public override object VisitDoWhileStatement([NotNull] ClepsParser.DoWhileStatementContext context)
        {
            IValue whileConditionValue = Visit(context.TerminalCondition) as IValue;

            CurrMethodGenerator.CreateLoop(null, whileConditionValue);

            Visit(context.statementBlock());

            CurrMethodGenerator.CloseBlock();

            return(whileConditionValue);
        }
Ejemplo n.º 2
0
        public override object VisitIfStatement([NotNull] ClepsParser.IfStatementContext context)
        {
            IValue conditionValue = Visit(context.rightHandExpression()) as IValue;

            CurrMethodGenerator.CreateIfStatementBlock(conditionValue);

            Visit(context.statementBlock());

            CurrMethodGenerator.CloseBlock();

            return(conditionValue);
        }