mirror of
https://github.com/github/semantic.git
synced 2024-12-22 22:31:36 +03:00
Add Goto Statement constructor
This commit is contained in:
parent
4c71eb88b5
commit
af5bc5650c
@ -22,6 +22,12 @@ data Else a = Else { elseCondition :: !a, elseBody :: !a }
|
||||
instance Eq1 Else where liftEq = genericLiftEq
|
||||
instance Show1 Else where liftShowsPrec = genericLiftShowsPrec
|
||||
|
||||
newtype Goto a = Goto { gotoLocation :: a }
|
||||
deriving (Diffable, Eq, Foldable, Functor, GAlign, Generic1, Mergeable, Show, Traversable)
|
||||
|
||||
instance Eq1 Goto where liftEq = genericLiftEq
|
||||
instance Show1 Goto where liftShowsPrec = genericLiftShowsPrec
|
||||
|
||||
-- TODO: Alternative definition would flatten if/else if/else chains: data If a = If ![(a, a)] !(Maybe a)
|
||||
|
||||
-- | A pattern-matching or computed jump control-flow statement, like 'switch' in C or JavaScript, or 'case' in Ruby or Haskell.
|
||||
|
Loading…
Reference in New Issue
Block a user