mirror of
https://github.com/revanced/smali.git
synced 2025-06-12 12:17:37 +02:00
Improve error handling for annotation element parsing
This commit is contained in:
@ -4,3 +4,6 @@
|
||||
.annotation runtime .blah
|
||||
.end annotation
|
||||
|
||||
.annotation runtime Lblah;
|
||||
blah .blah .blah
|
||||
.end annotation
|
@ -27,4 +27,24 @@ smali.FILE
|
||||
PsiWhiteSpace('\n')
|
||||
PsiElement(ANNOTATION_PARAMETER_LIST)
|
||||
<empty list>
|
||||
PsiElement(END_ANNOTATION_DIRECTIVE)('.end annotation')
|
||||
PsiWhiteSpace('\n\n')
|
||||
SmaliAnnotation(ANNOTATION)
|
||||
PsiElement(ANNOTATION_DIRECTIVE)('.annotation')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(ANNOTATION_VISIBILITY)('runtime')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(CLASS_TYPE)
|
||||
PsiElement(CLASS_DESCRIPTOR)('Lblah;')
|
||||
PsiWhiteSpace('\n ')
|
||||
PsiElement(ANNOTATION_PARAMETER_LIST)
|
||||
PsiElement(ANNOTATION_ELEMENT)
|
||||
PsiElement(ANNOTATION_ELEMENT_NAME)
|
||||
PsiElement(SIMPLE_NAME)('blah')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiErrorElement:mismatched input '.blah' expecting EQUAL
|
||||
PsiElement(BAD_CHARACTER)('.blah')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(BAD_CHARACTER)('.blah')
|
||||
PsiWhiteSpace('\n')
|
||||
PsiElement(END_ANNOTATION_DIRECTIVE)('.end annotation')
|
Reference in New Issue
Block a user