Andreas Dangel
b110186ed7
[java] Add Java 13 support
...
* Add text block literal
2019-08-13 20:00:40 +02:00
Andreas Dangel
969972214c
[java] Add Java 13 support
...
* Java 13 is the new default
* New yield statement
2019-08-13 18:42:40 +02:00
Clément Fournier
94afed80df
Fix ambiguity with switch
2019-05-30 15:48:55 +02:00
Clément Fournier
39921f40b4
Add to grammar changelog
2019-05-30 15:06:50 +02:00
Clément Fournier
10158751d2
Fix local class modifiers being forgotten
2019-05-30 14:53:16 +02:00
Clément Fournier
ae8ba5128b
Fix annotated module declaration
2019-05-25 07:27:59 +02:00
Andreas Dangel
ec68c2979c
[java] avoid most lookaheads for SwitchStatements
2019-03-31 10:33:02 +02:00
Andreas Dangel
f8652fbf9a
[java] Add SwitchLabeledRule interface, remove SwitchBlockGroup
2019-03-31 00:21:34 +01:00
Andreas Dangel
65b2990ad1
Fix break statement
2019-03-17 10:22:11 +01:00
Andreas Dangel
e103ef4869
[java] Rename SwitchLabeledRule -> SwitchBlockGroup
...
The plan is with PMD, that also the switch block statements
are grouped together with the switch label, like the switch rules
2019-03-17 10:22:06 +01:00
Andreas Dangel
d7aa1b1742
Support Expression in break statements
2019-03-16 11:55:38 +01:00
Clément Fournier
2793c3e029
Remove arbitrary lookahead
2019-03-16 11:55:38 +01:00
Andreas Dangel
65cac51445
[java] Add Java12 support
2019-03-16 11:55:38 +01:00
Andreas Dangel
8949019da6
[java] Add Java12 support
2019-03-16 11:55:38 +01:00
Rohit Kumar
874b528da8
Adding test cases and fixing review comments
2018-11-12 17:35:29 +05:30
Rohit Kumar
6fb8b6b1b6
Adding the fix for #1440
2018-11-12 01:56:35 +05:30
Clément Fournier
40ce9313ae
Deprecate R[UN]SIGNEDSHIFT
...
No usages to report
2018-08-20 18:08:21 +02:00
Andreas Dangel
c362f5a77f
[java] Prepare for Java 11
2018-07-19 22:00:34 +02:00
Clément Fournier
07516ee8ac
Deprecate isTernary on ConditionalExpression
2018-07-03 02:13:22 +02:00
Clément Fournier
80e27d049a
Add doc to some AST nodes
2018-06-26 12:21:22 +02:00
Andreas Dangel
a46288547d
Rework "var" support for java10 using void production for LocalVariableType
2018-05-28 21:18:59 +02:00
Andreas Dangel
0b0479d7c0
Prevent using "var" as type name, annotation name or enum with Java 10
2018-05-28 20:07:10 +02:00
Andreas Dangel
8f4b2647c4
Merge branch 'master' into java10-basic-support
2018-05-21 10:07:05 +02:00
Andreas Dangel
93347719b3
[java] Rename ASTType.isVarType to ASTType.isTypeInferred
2018-05-11 16:17:00 +02:00
Juan Martín Sotuyo Dodero
5de405d23f
[java] Fix scoping inconsistencies
...
- Reduce LocalScope creations. Method parameters and method locals have
the same visibility / reachability, so they should be in the same scope.
- Fix the grammar `assert` lookahead. There is no need to use `(`
- Fix illegal test code (shadowing of parameters is illegal)
- Update Scope tests to deal with changes
- Fixes #1051
2018-05-06 20:42:33 -03:00
Andreas Dangel
18dfba939c
[java] First step for java10 local variable type inference
2018-05-01 17:14:06 +02:00
Juan Martín Sotuyo Dodero
32af9cabf2
[java] Update valid identifiers
...
- Newer Java versions have allowed for a lot more tokens in identifiers
2018-02-18 04:44:27 -03:00
Clément Fournier
22596e5176
Add ghost production for TypeAnnotation to cleanup the grammar
...
Type annotations can be nearly everywhere since Java 8, which makes the grammar
really hard to read when the check for correct jdk version is repeated all over
the place.
2018-02-16 23:53:37 +01:00
Juan Martín Sotuyo Dodero
f9df6ed01e
[java] Fix grammar for <> in Java 1.8
...
- Fixes #888
- Allow the contents of an anonymous class to use diamong notation, but
the anonymous class itself can't use it
2018-01-29 14:10:40 -03:00
Andreas Dangel
109f458dbf
Fixes #793 [java] Parser error with private method in nested classes in interfaces
...
* Remember old state to allow nesting
* Fix ASTMethodDeclaration.isInterfaceMember
* Extended tests
2017-12-22 12:03:20 +01:00
Andreas Dangel
64b862eef9
Fixes #793 [java] Parser error with private method in nested classes in interfaces
2017-12-20 22:42:34 +01:00
Juan Martín Sotuyo Dodero
05927af574
[java] Properly resolve array types
...
- Honor dimensions of arrays
- Resolve types for allocations as well as declarations of arrays
2017-10-26 22:31:29 -03:00
gonzalo
c00400ef77
Fix try with final resource
2017-10-18 08:50:06 -03:00
Andreas Dangel
6590a358e6
Support concise try-with-resources with java9
2017-09-23 00:15:08 +02:00
Andreas Dangel
f30eb4b5ff
Use semantic lookahead for the module productions
...
The new keyword are only "restricted keywords" and can still be used
as identifiers.
2017-09-22 23:43:43 +02:00
Andreas Dangel
1020bf73db
Enhance grammar to parse Java 9 module-info.java
2017-09-22 21:35:24 +02:00
Andreas Dangel
672f9216dd
Simplify grammar: TypeArguments is not used here, it's resolved
...
as a child by ClassOrInterfaceType already
2017-09-22 15:32:24 +02:00
Andreas Dangel
77222904de
Check for diamond operator for anonymous classes
2017-09-22 15:32:19 +02:00
Andreas Dangel
722b2b1657
Allow nested private methods
2017-09-22 13:33:08 +02:00
Andreas Dangel
cfa4b5b85c
Add Java9 Language Module, Update grammar
...
* Java8 mode now rejects private methods in interfaces
* Java9 mode now rejects "_" as identifier
2017-09-22 12:19:38 +02:00
Juan Martín Sotuyo Dodero
0822218574
Simplify expressions
2017-06-01 11:56:48 -03:00
snap252
2460402ea8
test case & adapted grammar for annotated generic return type
...
public static <T> @Nullable T getNullableEnum() {
return null;
}
2017-06-01 15:00:20 +02:00
Git Guru
b8d435235f
fixed/removed unneeded change
...
@@ -1488,7 +1488,7 @@ void MethodDeclaration(int modifiers) :
{jjtThis.setModifiers(modifiers);}
{
[ TypeParameters() ]
- ResultType() MethodDeclarator() [ "throws" NameList() ]
+ [(Annotation() {checkForBadTypeAnnotations();})+] ResultType()
MethodDeclarator() [ "throws" NameList() ]
2017-06-01 10:13:29 +02:00
snap252
a4754e9fc9
I hear voices ... and they tell me to like multi dimensional arrays
...
private static void testMultiDimArrayWithAnnotations() {
// ever used a 2D-Array in java??
Object x = new Object @NonNull[2] @Nullable[1] @NonNull[3];
}
2017-05-30 15:15:44 +02:00
snap252
7997297e0b
test case for
...
public void createNonNullArray() {
return new MetaColumn @NonNull [value];
}
2017-05-30 14:13:38 +02:00
snap252
b5474cdcf8
test case and fix for
...
public static <T extends @NonNull Enum<T>> getEnum() {
return null;
}
2017-05-30 14:05:29 +02:00
snap252
0660c7298a
+ simplified
2017-05-30 12:31:03 +02:00
snap252
d314a2c301
test case for
...
private byte @Nullable [] getBytes(){
return null;
}
2017-05-30 12:20:26 +02:00
Git Guru
7a4766e8a6
[java] Parsing Problem with Annotation for Array Member Types #417
2017-05-30 10:52:09 +02:00
Git Guru
68ab7048cb
*[java]* Java 8 parsing problem with annotations for wildcards #414
2017-05-29 18:20:12 +02:00