1
1
mirror of https://github.com/github/semantic.git synced 2024-12-23 06:41:45 +03:00

Add Try to toTermName

This commit is contained in:
joshvera 2016-07-29 16:02:25 -04:00
parent ddcb6f6a1d
commit 0bfa2fef2b

View File

@ -68,6 +68,7 @@ toTermName source term = case unwrap term of
forClauseRanges = characterRange . extract <$> exprs forClauseRanges = characterRange . extract <$> exprs
S.While expr _ -> toTermName' expr S.While expr _ -> toTermName' expr
S.DoWhile _ expr -> toTermName' expr S.DoWhile _ expr -> toTermName' expr
S.Try expr _ _ -> toText $ Source.slice (characterRange $ extract expr) source
Comment a -> toCategoryName a Comment a -> toCategoryName a
where toTermName' = toTermName source where toTermName' = toTermName source