diff --git a/src/Category.hs b/src/Category.hs index 3097ed669..05f766c23 100644 --- a/src/Category.hs +++ b/src/Category.hs @@ -188,6 +188,8 @@ data Category -- | An END {} block of statements. | EndBlock | ParameterDecl + -- | A default case in a switch statement. + | Default deriving (Eq, Generic, Ord, Show) -- Instances diff --git a/src/Syntax.hs b/src/Syntax.hs index 5e2ffab67..d872fe08f 100644 --- a/src/Syntax.hs +++ b/src/Syntax.hs @@ -47,6 +47,8 @@ data Syntax a f | SubscriptAccess { subscriptId :: f, subscriptElement :: f } | Switch { switchExpr :: f, cases :: [f] } | Case { caseExpr :: f, caseStatements :: [f] } + -- | A default case in a switch statement. + | Default [f] | Select { cases :: [f] } | Object { objectTy :: Maybe f, keyValues :: [f] } -- | A pair in an Object. e.g. foo: bar or foo => bar