forked from phoedos/pmd
Fix grammar for annotation members
- The lookahead (3 tokens) was too small, and without reaching the opening parenthesis assumed it was parsing a method and not a field. - Using a larger lookahead solves the issue. - Fixes #206
This commit is contained in:

committed by
Andreas Dangel

parent
aff9fc90ef
commit
455b1c4ded
@@ -1,4 +1,9 @@
|
||||
/**
|
||||
* Change lookahead for AnnotationMethodDeclaration in AnnotationTypeMemberDeclaration.
|
||||
* Bug #206
|
||||
*
|
||||
* Juan Martin Sotuyo Dodero 01/2017
|
||||
*====================================================================
|
||||
* Allow method references to specify generics.
|
||||
* Bug #207
|
||||
*
|
||||
@@ -2282,7 +2287,7 @@ void AnnotationTypeMemberDeclaration():
|
||||
{
|
||||
modifiers = Modifiers()
|
||||
(
|
||||
LOOKAHEAD(3) AnnotationMethodDeclaration(modifiers)
|
||||
LOOKAHEAD(Type() <IDENTIFIER> "(") AnnotationMethodDeclaration(modifiers)
|
||||
|
|
||||
ClassOrInterfaceDeclaration(modifiers)
|
||||
|
|
||||
|
Reference in New Issue
Block a user