mirror of
https://github.com/github/semantic.git
synced 2024-12-26 08:25:19 +03:00
add modifier to enums
This commit is contained in:
parent
3bfb45fdb1
commit
d6c4791a55
@ -301,7 +301,7 @@ package :: Assignment
|
||||
package = makeTerm <$> symbol PackageDeclaration <*> children (Java.Syntax.Package <$> someTerm expression)
|
||||
|
||||
enum :: Assignment
|
||||
enum = makeTerm <$> symbol Grammar.EnumDeclaration <*> children (Java.Syntax.EnumDeclaration <$> term identifier <*> manyTerm enumConstant)
|
||||
enum = makeTerm <$> symbol Grammar.EnumDeclaration <*> children (Java.Syntax.EnumDeclaration <$> manyTerm modifier <*> term identifier <*> manyTerm enumConstant)
|
||||
where enumConstant = symbol EnumConstant *> children (term identifier)
|
||||
|
||||
return' :: Assignment
|
||||
|
@ -38,7 +38,7 @@ instance Show1 Package where liftShowsPrec = genericLiftShowsPrec
|
||||
-- TODO: Implement Eval instance for ArrayType
|
||||
instance Evaluatable Package
|
||||
|
||||
data EnumDeclaration a = EnumDeclaration { _enumDeclarationIdentifier :: !a, _enumDeclarationBody :: ![a] }
|
||||
data EnumDeclaration a = EnumDeclaration { enumDeclarationModifier :: ![a], enumDeclarationIdentifier :: !a, enumDeclarationBody :: ![a] }
|
||||
deriving (Declarations1, Diffable, Eq, Foldable, FreeVariables1, Functor, Generic1, Hashable1, Mergeable, Ord, Show, ToJSONFields1, Traversable)
|
||||
|
||||
instance Eq1 EnumDeclaration where liftEq = genericLiftEq
|
||||
|
Loading…
Reference in New Issue
Block a user