mirror of
https://github.com/revanced/smali.git
synced 2025-06-12 12:17:37 +02:00
Improve error handling for subannotation parsing
This commit is contained in:
@ -10,4 +10,10 @@
|
||||
|
||||
.annotation runtime Lblah;
|
||||
blah = .blah .blah
|
||||
.end annotation
|
||||
|
||||
.annotation runtime Lblah;
|
||||
blah = .subannotation Lblah2;
|
||||
blah = "blah"
|
||||
.blah
|
||||
.end annotation
|
@ -69,4 +69,39 @@ smali.FILE
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(BAD_CHARACTER)('.blah')
|
||||
PsiWhiteSpace('\n')
|
||||
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(' ')
|
||||
PsiElement(EQUAL)('=')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(LITERAL)
|
||||
PsiElement(SUBANNOTATION_DIRECTIVE)('.subannotation')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(CLASS_TYPE)
|
||||
PsiElement(CLASS_DESCRIPTOR)('Lblah2;')
|
||||
PsiWhiteSpace('\n ')
|
||||
PsiElement(ANNOTATION_ELEMENT)
|
||||
PsiElement(ANNOTATION_ELEMENT_NAME)
|
||||
PsiElement(SIMPLE_NAME)('blah')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(EQUAL)('=')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(LITERAL)
|
||||
PsiElement(STRING_LITERAL)('"blah"')
|
||||
PsiWhiteSpace('\n ')
|
||||
PsiErrorElement:mismatched input '.blah' expecting END_SUBANNOTATION_DIRECTIVE
|
||||
PsiElement(BAD_CHARACTER)('.blah')
|
||||
PsiWhiteSpace('\n')
|
||||
PsiElement(END_ANNOTATION_DIRECTIVE)('.end annotation')
|
Reference in New Issue
Block a user