1
1
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:
Rob Rix 2017-05-10 11:57:28 -04:00
parent 40d8a7ac5c
commit fdcf96cd4c

View File

@ -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 declarations 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).