1
1
mirror of https://github.com/github/semantic.git synced 2025-01-03 21:16:12 +03:00

update Method JSON

This commit is contained in:
joshvera 2016-07-30 13:26:21 -04:00
parent d3df14cafd
commit 69e2c99634

View File

@ -15,7 +15,6 @@ import qualified Data.Text as T
import Data.These
import Data.Vector hiding (toList)
import Info
import Range
import Renderer
import Source hiding (fromList)
import SplitDiff
@ -90,7 +89,8 @@ termFields info syntax = "range" .= characterRange info : "category" .= category
S.Comment _ -> []
S.Commented comments child -> childrenFields (comments <> maybeToList child)
S.Error sourceSpan c -> [ "sourceSpan" .= sourceSpan ] <> childrenFields c
S.Class identifier superclass definitions -> [ "classIdentifier" .= identifier ] <> [ "superclass" .= superclass ] <> [ "classDefinitions" .= definitions ]
S.Class identifier superclass definitions -> [ "classIdentifier" .= identifier ] <> [ "superclass" .= superclass ] <> [ "definitions" .= definitions ]
S.Method identifier params definitions -> [ "methodIdentifier" .= identifier ] <> [ "params" .= params ] <> [ "definitions" .= definitions ]
where childrenFields c = [ "children" .= c ]
patchFields :: (KeyValue kv, HasField fields Category, HasField fields Range) => SplitPatch (Term leaf (Record fields)) -> [kv]