Package tree

Examples of tree.HaxeTree


        context.checking(new Expectations()
        { {
            one(mockClass).getStandartTypeByName("Int");
            will(returnValue(intType));
        } });
        HaxeTree tree = parseFunction("function main() { var x; x=123 + 1; }");
        linker.visit(tree, new Environment());
        Binary node = TestHelper.getBinaryExpression(tree);
       
        assertTrue(node.getHaxeType() == TypeUtils.getInt());
    }
View Full Code Here


    }
   
    @Test
    public void testFloatAfterAdditionExpectiong() throws RecognitionException
    {
        HaxeTree tree = parseFunction("function main() { var x; x=123.1 + 1; }");
        linker.visit(tree, new Environment());
        Binary node = TestHelper.getBinaryExpression(tree);
       
        assertTrue(node.getHaxeType() == TypeUtils.getFloat());
    }
View Full Code Here

    }
   
    @Test
    public void testStringAfterAdditionExpectiong() throws RecognitionException
    {
        HaxeTree tree = parseFunction("function main() { var x; x=123 + \" monkeys\"; }");
        linker.visit(tree, new Environment());
        Binary node = TestHelper.getBinaryExpression(tree);
       
        assertTrue(node.getHaxeType() == TypeUtils.getString());
    }
View Full Code Here

    ///
    /// Parcer
    ///
    @Test
    public void testUnarOpNot() throws RecognitionException {
        HaxeTree tree = parseExpression("!x");
        assertTrue(tree instanceof Unary);
    }
View Full Code Here

        assertTrue(tree instanceof Unary);
    }
   
    @Test
    public void testUnarOpSub() throws RecognitionException {
        HaxeTree tree = parseExpression("-x");
        assertTrue(tree instanceof Unary);
    }
View Full Code Here

        assertTrue(tree instanceof Unary);
    }
   
    @Test
    public void testUnarOpIncrement() throws RecognitionException {
        HaxeTree tree = parseExpression("++x");
        assertTrue(tree instanceof Unary);
    }
View Full Code Here

        assertTrue(tree instanceof Unary);
    }
   
    @Test
    public void testUnarOpIncrement2() throws RecognitionException {
        HaxeTree tree = parseExpression("x++");
        assertTrue(tree instanceof Unary);
    }
View Full Code Here

        assertTrue(tree instanceof Unary);
    }
   
    @Test
    public void testUnarOpDecrement() throws RecognitionException {
        HaxeTree tree = parseExpression("--x");
        assertTrue(tree instanceof Unary);
    }
View Full Code Here

        assertTrue(tree instanceof Unary);
    }
   
    @Test
    public void testUnarOpDecrement2() throws RecognitionException {
        HaxeTree tree = parseExpression("x--");
        assertTrue(tree instanceof Unary);
    }
View Full Code Here

        assertTrue(tree instanceof Unary);
    }
   
    @Test
    public void testUnarOpComplement() throws RecognitionException {
        HaxeTree tree = parseExpression("~x");
        assertTrue(tree instanceof Unary);
    }
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.