mirror of
https://github.com/github/semantic.git
synced 2024-12-21 13:51:44 +03:00
Add a Default Syntax for default cases
This commit is contained in:
parent
3d95799fc7
commit
cbd132c8dc
@ -188,6 +188,8 @@ data Category
|
|||||||
-- | An END {} block of statements.
|
-- | An END {} block of statements.
|
||||||
| EndBlock
|
| EndBlock
|
||||||
| ParameterDecl
|
| ParameterDecl
|
||||||
|
-- | A default case in a switch statement.
|
||||||
|
| Default
|
||||||
deriving (Eq, Generic, Ord, Show)
|
deriving (Eq, Generic, Ord, Show)
|
||||||
|
|
||||||
-- Instances
|
-- Instances
|
||||||
|
@ -47,6 +47,8 @@ data Syntax a f
|
|||||||
| SubscriptAccess { subscriptId :: f, subscriptElement :: f }
|
| SubscriptAccess { subscriptId :: f, subscriptElement :: f }
|
||||||
| Switch { switchExpr :: f, cases :: [f] }
|
| Switch { switchExpr :: f, cases :: [f] }
|
||||||
| Case { caseExpr :: f, caseStatements :: [f] }
|
| Case { caseExpr :: f, caseStatements :: [f] }
|
||||||
|
-- | A default case in a switch statement.
|
||||||
|
| Default [f]
|
||||||
| Select { cases :: [f] }
|
| Select { cases :: [f] }
|
||||||
| Object { objectTy :: Maybe f, keyValues :: [f] }
|
| Object { objectTy :: Maybe f, keyValues :: [f] }
|
||||||
-- | A pair in an Object. e.g. foo: bar or foo => bar
|
-- | A pair in an Object. e.g. foo: bar or foo => bar
|
||||||
|
Loading…
Reference in New Issue
Block a user