Package loop.ast

Examples of loop.ast.Computation


      case ASSIGN:
      case GREATER:
      case LESSER:
      case GEQ:
      case LEQ:
        Computation computation = new Computation();
        computation.add(reduceNode(list.children().get(1)));

        // Add binary op chain.
        for (int i = 2; i < list.children().size(); i++) {
          BinaryOp op = new BinaryOp(new Token(var.name, kind, var.sourceLine, var.sourceColumn));
          op.add(reduceNode(list.children().get(i)));
          computation.add(op);
        }

        return computation;
    }

    TernaryIfExpression ifExpression = new TernaryIfExpression();
    Computation test = new Computation();
    test.add(var);
    test.add(new BinaryOp(new Token("in", Token.Kind.IN, var.sourceLine, var.sourceColumn))
        .add(new JavaLiteral('"' + Closure.class.getName() + '"')));
    ifExpression.add(test);                               // test := var instanceof closure
    ifExpression.add(toFunctionCall(var, list));          // then call
    ifExpression.add(var);                                // else return as is
View Full Code Here

TOP

Related Classes of loop.ast.Computation

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.