Clarify grammar rules for annotations

This commit is contained in:
Denis Zharkov
2015-06-09 14:00:21 +03:00
parent cf4b1ab7cd
commit 9d87638a11
2 changed files with 35 additions and 18 deletions
+11 -4
View File
@@ -3,14 +3,21 @@
*/
annotations
: annotation*
: (annotation | annotationList)*
;
annotation
: "@"? "[" annotationEntry+ "]"
: "@"? annotationEntry
: annotationPrefix? unescapedAnnotation
;
annotationEntry
annotationList
: annotationPrefix "[" unescapedAnnotation+ "]"
;
annotationPrefix:
: ("@" (":" "file")?)
;
unescapedAnnotation
: SimpleName{"."} typeArguments? valueArguments?
;