1
1
mirror of https://github.com/github/semantic.git synced 2025-01-06 06:46:07 +03:00

Add an error JSON case

This commit is contained in:
joshvera 2016-07-26 14:49:14 -04:00
parent e7000b7de3
commit be82432aa0

View File

@ -85,6 +85,7 @@ termFields info syntax = "range" .= characterRange info : "category" .= category
S.Pair a b -> childrenFields [a, b]
S.Comment _ -> []
S.Commented comments child -> childrenFields (comments <> maybeToList child)
S.Error c -> childrenFields c
where childrenFields c = [ "children" .= c ]
patchFields :: (KeyValue kv, HasField fields Category, HasField fields Range) => SplitPatch (Term leaf (Record fields)) -> [kv]