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

Use termNameFromSource in toTermName

This commit is contained in:
joshvera 2016-08-04 10:13:56 -04:00
parent 2286b2b37b
commit e39ab20eee

View File

@ -67,10 +67,10 @@ toTermName source term = case unwrap term of
S.For exprs _ -> termNameFromChildren term exprs
S.While expr _ -> toTermName' expr
S.DoWhile _ expr -> toTermName' expr
S.Throw expr -> toText $ Source.slice (characterRange $ extract expr) source
S.Throw expr -> termNameFromSource expr
S.Constructor expr -> toTermName' expr
S.Try expr _ _ -> toText $ Source.slice (characterRange $ extract expr) source
S.Array _ -> toText $ Source.slice (characterRange $ extract term) source
S.Try expr _ _ -> termNameFromSource expr
S.Array _ -> termNameFromSource term
S.Class identifier _ _ -> toTermName' identifier
S.Method identifier _ _ -> toTermName' identifier
Comment a -> toCategoryName a