Package tree.statement

Examples of tree.statement.Return



                    RETURN134=(Token)match(input,RETURN,FOLLOW_RETURN_in_statementLast2406); if (state.failed) return retval;
                    if ( state.backtracking==0 ) {
                    RETURN134_tree =
                    new Return(RETURN134)
                    ;
                    root_0 = (Object)adaptor.becomeRoot(RETURN134_tree, root_0);
                    }

                    // Haxe.g:243:35: ( expr )?
View Full Code Here


            {
                return (Return)i;
            }
            else if (i.getChildCount() > 0)
            {
                Return result = getReturnNode(i);
                if (result != null)
                {
                    return result;
                }
            }
View Full Code Here

    public void testIntToFloatInReturnNode() throws RecognitionException
    {
        HaxeTree tree = parseModule("class A { function main():Int { return 123.1;}}");
        linker.visit(tree, new Environment());
       
        Return returnNode = getReturnNode(tree);
        HaxeType type = returnNode.getHaxeType();
        Function function = returnNode.getFunction();   
        HaxeType funType = function.getHaxeType();
       
        assertTrue(!TypeUtils.isAvailableAssignement(funType, type));
    }
View Full Code Here

    public void testFloatToIntInReturnNode() throws RecognitionException
    {
        HaxeTree tree = parseModule("class A { function main():Float { return 123;}}");
        linker.visit(tree, new Environment());
       
        Return returnNode = getReturnNode(tree);
        HaxeType type = returnNode.getHaxeType();
        Function function = returnNode.getFunction();
        HaxeType funType = function.getHaxeType();
       
        assertTrue(TypeUtils.isAvailableAssignement(funType, type));
    }
View Full Code Here

TOP

Related Classes of tree.statement.Return

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.