Martinho0330 / javaparser

Automatically exported from code.google.com/p/javaparser
0 stars 0 forks source link

Support Java 7 grammar #34

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Java 7 has some syntactical changes:

1. JSR 308: type annotations on Java
2. Project Coin changes, as described here 
(http://wikis.sun.com/display/ProjectCoin/2009ProposalsTOC).
3. Jigsaw module syntax
4. Potentially lambda/closure expressions

Attached is my code to get javaparser to support jsr 308 (not quite ready for 
integration yet).

Original issue reported on code.google.com by notn...@gmail.com on 26 Feb 2010 at 5:07

Attachments:

GoogleCodeExporter commented 9 years ago
Since Java 7 has been released, it would be nice to support its features.  
Those features do not include #1, #3, or #4 in the original bug report, all of 
which are planned for Java 8.  However, Java 7 does include #2.  Adding support 
for that would be very nice.

Original comment by michael.ernst@gmail.com on 13 Aug 2011 at 10:34

GoogleCodeExporter commented 9 years ago
Here is an example class where I am encountering difficulties with:

package com.whiletrue;

import java.util.HashMap;
import java.util.Map;

public class Test
{
    static
    {
        Map<String, String> map = new HashMap<>();
    }
}

Original comment by johannes...@gmail.com on 21 Jun 2012 at 6:21

GoogleCodeExporter commented 9 years ago
A fork supporting Java 7 is available at https://github.com/before/javaparser

Original comment by donnch...@gmail.com on 4 Oct 2013 at 8:33

GoogleCodeExporter commented 9 years ago
Hi,

I've just tested the version on github, but while compiling it complains that 
the class "ASTParser" is missing. Indeed, I can't find this file. Using the 
"ASTParser.java" from the Google-code project doesn't work either because of a 
compilation error.

Is there anyone that can help?

Original comment by robert.f...@gmail.com on 9 Oct 2013 at 8:53

GoogleCodeExporter commented 9 years ago
ASTParser is generated by javacc. The maven POM includes the javacc plugin so 
it will be generated when you run a maven build.

Original comment by donnch...@gmail.com on 9 Oct 2013 at 9:01

GoogleCodeExporter commented 9 years ago
Thanks! That was it :) It now works :-D

Original comment by robert.f...@gmail.com on 9 Oct 2013 at 9:32