mirror of
https://github.com/github/semantic.git
synced 2024-12-30 18:36:27 +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.
|
||||
| EndBlock
|
||||
| ParameterDecl
|
||||
-- | A default case in a switch statement.
|
||||
| Default
|
||||
deriving (Eq, Generic, Ord, Show)
|
||||
|
||||
-- Instances
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user