1
1
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:
Timothy Clem 2016-11-09 10:45:25 -08:00
parent f37bcfd157
commit 03f65821ce

View File

@ -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)