forked from javaparser/javaparser
-
Notifications
You must be signed in to change notification settings - Fork 0
Roadmap
Nicholas Smith edited this page Nov 2, 2015
·
1 revision
Originally Proposed in this Issue
Here is what I propose:
-
Add problem reporting mechanism
- Introduce a Location object (source path + Position, comparable)
- Introduce a Problem object (comparable based on Location)
- Introduce a Reporter interface and an implementation that creates and stores problems
- Make ParserException have a list of problems
-
Make JavaParser a state-full object
- Give access to the (exception-free) reporting mechanism
- Keep static helpers that throw ParseException
-
Introduce NoopVoidVisitor and NoopGenericVisitor
-
Add a Checks class (that takes a reporter)
- Implement no-cost semantic checks
- Modifiers coherence
- ...
- Extract checks currently made inside the grammar (so that people can use them to check hand-created nodes)
- Call the checks from the grammar
- Implement a check(Node) (that uses a noop void visitor)
- Implement a deepCheck(Node) (that uses a scanner void visitor)
- Implement no-cost semantic checks
-
Lexical preservation
- Introduce Lexeme class (begin and end position, kind, image)
- Replace the four position integers in Node with a first and last Lexeme
- Replace the constructor of AST node accordingly
- Adapt the grammar to use the new constructors (All this is similar to what I've done in grammar-work)
-
AST consistency consolidation
- Remove MultiTypeParameter in favor of UnionType – #111
- Introduce ArrayType – #112
- Change {Method&Constructor}Declaration.throws to be ClassOrInterfaceType
-
Grammar enhancements
- No conditionals as left-hand side of assignements – #109
- Type annotations fixes – #107