diff --git a/src/Language/Java/Assignment.hs b/src/Language/Java/Assignment.hs index a1b35aeb2..c8e1271b4 100644 --- a/src/Language/Java/Assignment.hs +++ b/src/Language/Java/Assignment.hs @@ -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 diff --git a/src/Language/Java/Syntax.hs b/src/Language/Java/Syntax.hs index 654dc8e8d..86a6b9208 100644 --- a/src/Language/Java/Syntax.hs +++ b/src/Language/Java/Syntax.hs @@ -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