1
1
mirror of https://github.com/github/semantic.git synced 2024-12-01 00:33:59 +03:00

stubbing in annotationType stuff

This commit is contained in:
Ayman Nadeem 2018-07-20 12:45:36 -04:00
parent 536d3b2835
commit 580efad636
2 changed files with 21 additions and 2 deletions

View File

@ -285,7 +285,7 @@ char = makeTerm <$> symbol CharacterLiteral <*> (Literal.TextElement <$> source)
-- Identifiers
identifier :: Assignment Term
identifier = makeTerm <$> (symbol Identifier <|> symbol TypeIdentifier) <*> (Syntax.Identifier . name <$> source)
identifier = makeTerm <$> (symbol Identifier) <*> (Syntax.Identifier . name <$> source)
typeIdentifier :: Assignment Term
typeIdentifier = makeTerm <$> (symbol Identifier) <*> (Syntax.Identifier . name <$> source)

View File

@ -1,4 +1,4 @@
{-# LANGUAGE DeriveAnyClass #-}
{-# LANGUAGE DeriveAnyClass, DuplicateRecordFields #-}
{-# OPTIONS_GHC -Wno-missing-export-lists #-}
module Language.Java.Syntax where
@ -283,3 +283,22 @@ instance Show1 AssertStatement where liftShowsPrec = genericLiftShowsPrec
-- TODO: Implement Eval instance for AssertStatement
instance Evaluatable AssertStatement
newtype DefaultValue a = DefaultValue { defaultValueElement :: a }
deriving (Declarations1, Diffable, Eq, Foldable, FreeVariables1, Functor, Generic1, Hashable1, Mergeable, Ord, Show, ToJSONFields1, Traversable)
instance Eq1 DefaultValue where liftEq = genericLiftEq
instance Ord1 DefaultValue where liftCompare = genericLiftCompare
instance Show1 DefaultValue where liftShowsPrec = genericLiftShowsPrec
instance Evaluatable DefaultValue
data AnnotationTypeElement a = AnnotationTypeElement { modifiers :: ![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
instance Ord1 AnnotationTypeElement where liftCompare = genericLiftCompare
instance Show1 AnnotationTypeElement where liftShowsPrec = genericLiftShowsPrec
-- TODO: Implement Eval instance for AnnotationTypeElement
instance Evaluatable AnnotationTypeElement