1
1
mirror of https://github.com/github/semantic.git synced 2025-01-05 22:28:10 +03:00

Rb.Lambda

This commit is contained in:
Ayman Nadeem 2020-05-13 11:32:35 -04:00
parent 0cc12e3812
commit 2854bb8e87

View File

@ -205,10 +205,14 @@ instance ToTags Rb.Lambda where
tags b
instance ToTags Rb.If where
tags Rb.If {condition, consequence, alternative} = do
tags condition
maybe (pure ()) tags consequence
maybe (pure ()) tags alternative
tags Rb.If {condition = Parse.Success cond, consequence, alternative} = do
tags cond
case consequence of
Just (Parse.Success cons) -> tags cons
_ -> pure ()
case alternative of
Just (Parse.Success alt) -> tags alt
_ -> pure ()
instance ToTags Rb.Elsif where
tags Rb.Elsif {condition, consequence, alternative} = do