1
1
mirror of https://github.com/github/semantic.git synced 2024-12-22 22:31:36 +03:00

Add Throw to JSON

This commit is contained in:
joshvera 2016-07-29 15:33:51 -04:00
parent b97da37c79
commit 14c9f3f7a6

View File

@ -90,6 +90,7 @@ 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.Throw c -> [ "throwExpression" .= c ]
where childrenFields c = [ "children" .= c ]
patchFields :: (KeyValue kv, HasField fields Category, HasField fields Range) => SplitPatch (Term leaf (Record fields)) -> [kv]