Package com.pogofish.jadt.parser

Examples of com.pogofish.jadt.parser.ParserImpl.type()


    public void testRefTypeErrors() throws Exception {
        final ParserImpl p1 = parserImpl("Foo[");
        checkError(list(_UnexpectedToken("']'", "<EOF>", 1)), _ArrayType(_Ref(_ClassType("Foo", NO_ACTUAL_TYPE_ARGUMENTS))), p1.refType(), p1);

        final ParserImpl p2 = parserImpl("Foo<int>");
        checkError(list(_UnexpectedToken("'['", "'>'", 1)), _Ref(_ClassType("Foo", list(_ArrayType(_Primitive(_IntType()))))), p2.type(), p2);

        final ParserImpl p3 = parserImpl("Foo<A");
        checkError(list(_UnexpectedToken("'>'", "<EOF>", 1)), _Ref(_ClassType("Foo", list(_ClassType("A", NO_ACTUAL_TYPE_ARGUMENTS)))), p3.type(), p3);

        final ParserImpl p4 = parserImpl("Foo<A B>");
View Full Code Here


        final ParserImpl p2 = parserImpl("Foo<int>");
        checkError(list(_UnexpectedToken("'['", "'>'", 1)), _Ref(_ClassType("Foo", list(_ArrayType(_Primitive(_IntType()))))), p2.type(), p2);

        final ParserImpl p3 = parserImpl("Foo<A");
        checkError(list(_UnexpectedToken("'>'", "<EOF>", 1)), _Ref(_ClassType("Foo", list(_ClassType("A", NO_ACTUAL_TYPE_ARGUMENTS)))), p3.type(), p3);

        final ParserImpl p4 = parserImpl("Foo<A B>");
        checkError(list(_UnexpectedToken("'>'", "'B'", 1)), _Ref(_ClassType("Foo", list(_ClassType("A", NO_ACTUAL_TYPE_ARGUMENTS)))), p4.type(), p4);

        final ParserImpl p5 = parserImpl("");
View Full Code Here

        final ParserImpl p3 = parserImpl("Foo<A");
        checkError(list(_UnexpectedToken("'>'", "<EOF>", 1)), _Ref(_ClassType("Foo", list(_ClassType("A", NO_ACTUAL_TYPE_ARGUMENTS)))), p3.type(), p3);

        final ParserImpl p4 = parserImpl("Foo<A B>");
        checkError(list(_UnexpectedToken("'>'", "'B'", 1)), _Ref(_ClassType("Foo", list(_ClassType("A", NO_ACTUAL_TYPE_ARGUMENTS)))), p4.type(), p4);

        final ParserImpl p5 = parserImpl("");
        checkError(list(_UnexpectedToken("a class name", "<EOF>", 1)), _Ref(_ClassType("NO_IDENTIFIER@1", NO_ACTUAL_TYPE_ARGUMENTS)), p5.type(), p5);
       
        final ParserImpl p6 = parserImpl("import");
View Full Code Here

        final ParserImpl p4 = parserImpl("Foo<A B>");
        checkError(list(_UnexpectedToken("'>'", "'B'", 1)), _Ref(_ClassType("Foo", list(_ClassType("A", NO_ACTUAL_TYPE_ARGUMENTS)))), p4.type(), p4);

        final ParserImpl p5 = parserImpl("");
        checkError(list(_UnexpectedToken("a class name", "<EOF>", 1)), _Ref(_ClassType("NO_IDENTIFIER@1", NO_ACTUAL_TYPE_ARGUMENTS)), p5.type(), p5);
       
        final ParserImpl p6 = parserImpl("import");
        checkError(list(_UnexpectedToken("a class name", "'import'", 1)), _Ref(_ClassType("BAD_IDENTIFIER_import@1", NO_ACTUAL_TYPE_ARGUMENTS)), p6.type(), p6);
       
    }
View Full Code Here

        final ParserImpl p5 = parserImpl("");
        checkError(list(_UnexpectedToken("a class name", "<EOF>", 1)), _Ref(_ClassType("NO_IDENTIFIER@1", NO_ACTUAL_TYPE_ARGUMENTS)), p5.type(), p5);
       
        final ParserImpl p6 = parserImpl("import");
        checkError(list(_UnexpectedToken("a class name", "'import'", 1)), _Ref(_ClassType("BAD_IDENTIFIER_import@1", NO_ACTUAL_TYPE_ARGUMENTS)), p6.type(), p6);
       
    }

    /**
     * Make sure arg modifiers parse properly
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.