예제 #1
0
 public bool visitLeave(If iff)
 {
     return true;
 }
예제 #2
0
        bool visitEnter(If ifSymbol)
        {
            Expression expression = ifSymbol.expression;
            Block block = ifSymbol.block;
            Block elseBlock = ifSymbol.elseBlock;

            Value.Value result = expressionEvaluator.resolve(scopes.First(), expression);
            Console.WriteLine("if(" + result.getBoolean() + ")");
            if (result.getBoolean())
            {
                block.accept(this);
            }
            else
            {
                elseBlock?.accept(this);
            }

            return false;
        }
예제 #3
0
 public bool visitEnter(If iff)
 {
     return true;
 }