1
1
mirror of https://github.com/github/semantic.git synced 2025-01-03 13:02:37 +03:00

Define toTermName over Commented nodes.

This commit is contained in:
Rob Rix 2016-08-04 10:00:37 -04:00
parent 70c6b42e69
commit 6c39b170e8

View File

@ -73,6 +73,7 @@ toTermName source term = case unwrap term of
S.Class identifier _ _ -> toTermName' identifier
S.Method identifier _ _ -> toTermName' identifier
Comment a -> toCategoryName a
S.Commented _ wrapped -> maybe "anonymous" toTermName' wrapped
where toTermName' = toTermName source
termNameFromChildren term cs = termNameFromRange (unionRangesFrom (range term) (range <$> cs))
termNameFromSource term = termNameFromRange (range term)