mirror of
https://github.com/github/semantic.git
synced 2025-01-03 04:51:57 +03:00
Extract the termName from the type, otherwise from the term
This commit is contained in:
parent
381453e3a7
commit
19141c2610
@ -252,7 +252,7 @@ toTermName source term = case unwrap term of
|
||||
S.ConditionalAssignment id _ -> toTermName' id
|
||||
S.Negate expr -> toTermName' expr
|
||||
S.Rescue args _ -> intercalate ", " $ toTermName' <$> args
|
||||
S.Struct _ _ -> termNameFromSource term
|
||||
S.Struct ty _ -> maybe (termNameFromSource term) termNameFromSource ty
|
||||
where toTermName' = toTermName source
|
||||
termNameFromChildren term children = termNameFromRange (unionRangesFrom (range term) (range <$> children))
|
||||
termNameFromSource term = termNameFromRange (range term)
|
||||
|
Loading…
Reference in New Issue
Block a user