mirror of
https://github.com/github/semantic.git
synced 2024-12-21 13:51:44 +03:00
Define a type for declarations.
This commit is contained in:
parent
40d8a7ac5c
commit
fdcf96cd4c
@ -5,6 +5,8 @@ module Renderer.TOC
|
||||
, JSONSummary(..)
|
||||
, Summarizable(..)
|
||||
, isErrorSummary
|
||||
, Declaration(..)
|
||||
, DeclarationType(..)
|
||||
, Entry(..)
|
||||
, tableOfContentsBy
|
||||
) where
|
||||
@ -61,6 +63,14 @@ data Summarizable
|
||||
}
|
||||
deriving (Eq, Show)
|
||||
|
||||
-- | A declaration’s identifier and type.
|
||||
data Declaration = Declaration { declarationIdentifier :: Text, declarationType :: DeclarationType }
|
||||
deriving (Eq, Show)
|
||||
|
||||
-- | The type of a declaration.
|
||||
data DeclarationType = Method | Function | Class
|
||||
deriving (Eq, Show)
|
||||
|
||||
-- | An entry in a table of contents.
|
||||
data Entry a
|
||||
= Unchanged a -- ^ An entry for an unchanged portion of a diff (i.e. a diff node not containing any patches).
|
||||
|
Loading…
Reference in New Issue
Block a user