Package tree

Examples of tree.HaxeTree


        assertTrue(tree instanceof Binary);
    }
   
    @Test
    public void testBinOpIter() throws RecognitionException {
        HaxeTree tree = parseExpression("x...y");
        assertTrue(tree instanceof Binary);
    }
View Full Code Here


    //
   
    // With Parenthesis
    @Test
    public void testBinOpWithParenthesis() throws RecognitionException {
        HaxeTree tree = parseExpression("z*(x*y)");
        assertTrue(tree instanceof Binary);
        assertTrue(tree.getChildCount() == 2);
        Binary binaryNode = (Binary)tree;
        assertTrue(binaryNode.getLeftOperand() instanceof Usage);
        assertTrue(binaryNode.getRightOperand() instanceof Binary);
    }
View Full Code Here

    }
   
    // Priority without parenthesis
    @Test
    public void testBinOpPriority1() throws RecognitionException {
        HaxeTree tree = parseExpression("z || x && y");
        Binary binaryNode = (Binary)tree;
        assertTrue(binaryNode.getLeftOperand() instanceof Usage);
        assertTrue(binaryNode.getRightOperand() instanceof Binary);
    }
View Full Code Here

        assertTrue(binaryNode.getRightOperand() instanceof Binary);
    }
   
    @Test
    public void testBinOpPriority2() throws RecognitionException {
        HaxeTree tree = parseExpression("z && x != y");
        Binary binaryNode = (Binary)tree;
        assertTrue(binaryNode.getLeftOperand() instanceof Usage);
        assertTrue(binaryNode.getRightOperand() instanceof Binary);
    }
View Full Code Here

        assertTrue(binaryNode.getRightOperand() instanceof Binary);
    }
   
    @Test
    public void testBinOpPriority3() throws RecognitionException {
        HaxeTree tree = parseExpression("z <= x|y");
        Binary binaryNode = (Binary)tree;
        assertTrue(binaryNode.getLeftOperand() instanceof Usage);
        assertTrue(binaryNode.getRightOperand() instanceof Binary);
    }
View Full Code Here

        assertTrue(binaryNode.getRightOperand() instanceof Binary);
    }
   
    @Test
    public void testBinOpPriority8() throws RecognitionException {
        HaxeTree tree = parseExpression("z ... x >= y");
        Binary binaryNode = (Binary)tree;
        assertTrue(binaryNode.getLeftOperand() instanceof Usage);
        assertTrue(binaryNode.getRightOperand() instanceof Binary);
    }
View Full Code Here

        assertTrue(binaryNode.getRightOperand() instanceof Binary);
    }
   
    @Test
    public void testBinOpPriority4() throws RecognitionException {
        HaxeTree tree = parseExpression("z | x << y");
        Binary binaryNode = (Binary)tree;
        assertTrue(binaryNode.getLeftOperand() instanceof Usage);
        assertTrue(binaryNode.getRightOperand() instanceof Binary);
    }
View Full Code Here

        assertTrue(binaryNode.getRightOperand() instanceof Binary);
    }
   
    @Test
    public void testBinOpPriority5() throws RecognitionException {
        HaxeTree tree = parseExpression("z << x + y");
        Binary binaryNode = (Binary)tree;
        assertTrue(binaryNode.getLeftOperand() instanceof Usage);
        assertTrue(binaryNode.getRightOperand() instanceof Binary);
    }
View Full Code Here

        assertTrue(binaryNode.getRightOperand() instanceof Binary);
    }
   
    @Test
    public void testBinOpPriority6() throws RecognitionException {
        HaxeTree tree = parseExpression("z << x + y");
        Binary binaryNode = (Binary)tree;
        assertTrue(binaryNode.getLeftOperand() instanceof Usage);
        assertTrue(binaryNode.getRightOperand() instanceof Binary);
    }
View Full Code Here

        assertTrue(binaryNode.getRightOperand() instanceof Binary);
    }
   
    @Test
    public void testBinOpPriority7() throws RecognitionException {
        HaxeTree tree = parseExpression("z - x * y");
        Binary binaryNode = (Binary)tree;
        assertTrue(binaryNode.getLeftOperand() instanceof Usage);
        assertTrue(binaryNode.getRightOperand() instanceof Binary);
    }
View Full Code Here

TOP

Related Classes of tree.HaxeTree

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.