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

Return a CofreeF instead of Syntax

This commit is contained in:
joshvera 2016-07-29 16:06:22 -04:00
parent 3ab1501b4e
commit 0bbc9293e9

View File

@ -108,6 +108,6 @@ termConstructor source sourceSpan info = cofree . construct
[body, catch, finally] | Catch <- category (extract catch), [body, catch, finally] | Catch <- category (extract catch),
Finally <- category (extract finally) -> Finally <- category (extract finally) ->
withDefaultInfo $ S.Try body (Just catch) (Just finally) withDefaultInfo $ S.Try body (Just catch) (Just finally)
_ -> S.Error sourceSpan children _ -> withDefaultInfo $ S.Error sourceSpan children
construct children = construct children =
withDefaultInfo $ S.Indexed children withDefaultInfo $ S.Indexed children