Parsing: support '@[ann1 ann2]', '@file:ann' and '@file:[ann]' cases

This commit is contained in:
Denis Zharkov
2015-05-15 12:25:55 +03:00
parent f6aadec7e2
commit e4f54b5d2e
25 changed files with 918 additions and 28 deletions
+3 -3
View File
@@ -7,10 +7,10 @@ annotations
;
annotation
: "[" annotationEntry+ "]"
: annotationEntry
: "@"? "[" annotationEntry+ "]"
: "@"? annotationEntry
;
annotationEntry
: "@"? ++ SimpleName{"."} typeArguments? valueArguments?
: SimpleName{"."} typeArguments? valueArguments?
;
+1 -1
View File
@@ -24,7 +24,7 @@ fileAnnotations
;
fileAnnotation
: "[" "file" ":" annotationEntry+ "]"
: "@" "file" ":" ("[" annotationEntry+ "]" | annotationEntry)
;
packageHeader