1
1
mirror of https://github.com/github/semantic.git synced 2024-12-23 06:41:45 +03:00

Add replacement run case for Ternary

This commit is contained in:
Rick Winfrey 2016-06-17 15:32:48 -05:00
parent 23903be464
commit 74f1ff50b7

View File

@ -64,6 +64,7 @@ run construct comparable cost algorithm = case runFree algorithm of
recur (MemberAccess a' as') (MemberAccess b' bs') = annotate $ MemberAccess (diffTerms' a' b') (diffTerms' as' bs')
recur (SubscriptAccess a' as') (SubscriptAccess b' bs') = annotate $ SubscriptAccess (diffTerms' a' b') (diffTerms' as' bs')
recur (MethodCall a' as' aParams') (MethodCall b' bs' bParams') = annotate $ MethodCall (diffTerms' a' b') (diffTerms' as' bs') (diffTerms' aParams' bParams')
recur (Ternary aCondition' aCases') (Ternary bCondition' bCases') = annotate $ Ternary (diffTerms' aCondition' bCondition') (zipWith diffTerms' aCases' bCases')
recur (Args as') (Args bs') = annotate . Args $ zipWith diffTerms' as' bs'
recur (VarDecl a') (VarDecl b') = annotate . VarDecl $ diffTerms' a' b'
recur (VarAssignment a' as') (VarAssignment b' bs') = annotate $ VarAssignment (diffTerms' a' b') (diffTerms' as' bs')