mirror of
https://github.com/github/semantic.git
synced 2024-12-23 23:11:50 +03:00
Add Operator case to run
This commit is contained in:
parent
e8fcd3390e
commit
ee799b2b67
@ -68,6 +68,7 @@ run construct comparable cost algorithm = case runFree algorithm of
|
|||||||
recur (Args as') (Args bs') = annotate . Args $ zipWith diffTerms' as' bs'
|
recur (Args as') (Args bs') = annotate . Args $ zipWith diffTerms' as' bs'
|
||||||
recur (VarDecl a') (VarDecl b') = annotate . VarDecl $ diffTerms' a' b'
|
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')
|
recur (VarAssignment a' as') (VarAssignment b' bs') = annotate $ VarAssignment (diffTerms' a' b') (diffTerms' as' bs')
|
||||||
|
recur (Operator a') (Operator b') = annotate $ Operator (zipWith diffTerms' a' b')
|
||||||
recur (Switch a' as') (Switch b' bs') = annotate $ Switch (diffTerms' a' b') (alignWith (these (pure . Delete) (pure . Insert) diffTerms') as' bs')
|
recur (Switch a' as') (Switch b' bs') = annotate $ Switch (diffTerms' a' b') (alignWith (these (pure . Delete) (pure . Insert) diffTerms') as' bs')
|
||||||
recur (Case a' as') (Case b' bs') = annotate $ Case (diffTerms' a' b') (diffTerms' as' bs')
|
recur (Case a' as') (Case b' bs') = annotate $ Case (diffTerms' a' b') (diffTerms' as' bs')
|
||||||
recur (Leaf _) (Leaf _) = pure $ Replace (cofree (annotation1 :< a)) (cofree (annotation2 :< b))
|
recur (Leaf _) (Leaf _) = pure $ Replace (cofree (annotation1 :< a)) (cofree (annotation2 :< b))
|
||||||
|
Loading…
Reference in New Issue
Block a user