mirror of
https://github.com/github/semantic.git
synced 2024-12-22 14:21:31 +03:00
Clean up guard to use more concise pattern
This commit is contained in:
parent
f37bcfd157
commit
03f65821ce
@ -74,7 +74,7 @@ termConstructor source sourceSpan name range children
|
||||
("conditional", condition : cases) -> S.Ternary condition cases
|
||||
("conditional", _ ) -> S.Error children
|
||||
("function_call", _ ) -> case children of
|
||||
member : args | category (extract member) == MemberAccess -> case toList (unwrap member) of
|
||||
member : args | MemberAccess <- category (extract member) -> case toList (unwrap member) of
|
||||
[target, method] -> S.MethodCall target method (toList . unwrap =<< args)
|
||||
_ -> S.Error children
|
||||
function : args -> S.FunctionCall function (toList . unwrap =<< args)
|
||||
|
Loading…
Reference in New Issue
Block a user