1
1
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:
joshvera 2017-01-10 16:05:55 -05:00
parent 3d95799fc7
commit cbd132c8dc
2 changed files with 4 additions and 0 deletions

View File

@ -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

View File

@ -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