mirror of
https://github.com/github/semantic.git
synced 2024-12-22 22:31:36 +03:00
Pattern match functions in MethodCalls better in toTermName
This commit is contained in:
parent
a0f415dece
commit
a911515456
@ -30,7 +30,8 @@ toTermName term = case unwrap term of
|
||||
(Syntax.FunctionCall{}, _) -> toTermName base <> "()." <> toTermName property
|
||||
(_, Syntax.FunctionCall{}) -> toTermName base <> "." <> toTermName property <> "()"
|
||||
(_, _) -> toTermName base <> "." <> toTermName property
|
||||
Syntax.MethodCall targetId methodId _ -> toTermName targetId <> "." <> toTermName methodId <> "()"
|
||||
Syntax.MethodCall targetId methodId _ -> let sep = case unwrap targetId of Syntax.FunctionCall{} -> "()."; _ -> "." in
|
||||
toTermName targetId <> sep <> toTermName methodId <> "()"
|
||||
|
||||
class HasCategory a where
|
||||
toCategoryName :: a -> Text
|
||||
|
Loading…
Reference in New Issue
Block a user