mirror of
https://github.com/github/semantic.git
synced 2024-12-22 22:31:36 +03:00
Add Case/Switch to toTermName
This commit is contained in:
parent
f28e50da8a
commit
212c0cc1a8
@ -36,9 +36,13 @@ toTermName term = case unwrap term of
|
||||
_ -> "."
|
||||
Syntax.VarAssignment varId _ -> toTermName varId
|
||||
Syntax.VarDecl decl -> toTermName decl
|
||||
-- TODO: We should remove Args from Syntax since I don't think we shouldn ever
|
||||
-- TODO: We should remove Args from Syntax since I don't think we should ever
|
||||
-- evaluate Args as a single toTermName Text - joshvera
|
||||
Syntax.Args args -> mconcat $ toTermName <$> args
|
||||
-- TODO: We should remove Case from Syntax since I don't think we should ever
|
||||
-- evaluate Case as a single toTermName Text - joshvera
|
||||
Syntax.Case expr _ -> toTermName expr
|
||||
Syntax.Switch expr cases -> toTermName expr
|
||||
|
||||
class HasCategory a where
|
||||
toCategoryName :: a -> Text
|
||||
|
Loading…
Reference in New Issue
Block a user