mirror of
https://github.com/github/semantic.git
synced 2024-12-01 00:33:59 +03:00
Add types to AnnotationTypeElement
Co-Authored-By: Ayman Nadeem <aymannadeem@gmail.com>
This commit is contained in:
parent
bc8e1ff1ec
commit
fb56ac59d0
@ -367,7 +367,7 @@ interface = makeTerm <$> symbol InterfaceDeclaration <*> children (normal <|> an
|
||||
annotationType = symbol AnnotationTypeDeclaration *> children (Declaration.InterfaceDeclaration [] <$> identifier <*> pure [] <*> annotationTypeBody)
|
||||
annotationTypeBody = symbol AnnotationTypeBody *> children (annotationTypeMember)
|
||||
annotationTypeMember = symbol AnnotationTypeMemberDeclaration *> children (class' <|> interface <|> constant)
|
||||
annotationTypeElement = makeTerm <$> symbol AnnotationTypeElementDeclaration <*> children (Java.Syntax.AnnotationTypeElement <$> many modifier <*> identifier <*> (dims <|> pure []) <*> (defaultValue <|> emptyTerm))
|
||||
annotationTypeElement = makeTerm <$> symbol AnnotationTypeElementDeclaration <*> children (Java.Syntax.AnnotationTypeElement <$> many modifier <*> type' <*> identifier <*> (dims <|> pure []) <*> (defaultValue <|> emptyTerm))
|
||||
defaultValue = makeTerm <$> symbol DefaultValue <*> children (Java.Syntax.DefaultValue <$> elementValue)
|
||||
elementValue = symbol ElementValue *> children (term expression) -- pull this to top level l8r
|
||||
interfaceMemberDeclaration = symbol InterfaceMemberDeclaration *> children (term expression)
|
||||
|
@ -313,7 +313,7 @@ instance Show1 DefaultValue where liftShowsPrec = genericLiftShowsPrec
|
||||
|
||||
instance Evaluatable DefaultValue
|
||||
|
||||
data AnnotationTypeElement a = AnnotationTypeElement { modifiers :: ![a], identifier :: !a, dims :: ![a], defaultValue :: !a }
|
||||
data AnnotationTypeElement a = AnnotationTypeElement { modifiers :: ![a], annotationType :: a, identifier :: !a, dims :: ![a], defaultValue :: !a }
|
||||
deriving (Declarations1, Diffable, Eq, Foldable, FreeVariables1, Functor, Generic1, Hashable1, Mergeable, Ord, Show, ToJSONFields1, Traversable)
|
||||
|
||||
instance Eq1 AnnotationTypeElement where liftEq = genericLiftEq
|
||||
|
Loading…
Reference in New Issue
Block a user