1
1
mirror of https://github.com/github/semantic.git synced 2024-12-21 05:41:54 +03:00

undefined != undefined'

This commit is contained in:
joshvera 2017-08-24 12:23:07 -04:00
parent f1ae96392d
commit b9d0e14149

View File

@ -127,6 +127,7 @@ type Syntax = '[
, Language.TypeScript.Syntax.ShorthandPropertyIdentifier
, Language.TypeScript.Syntax.InternalModule
, Language.TypeScript.Syntax.Super
, Language.TypeScript.Syntax.Undefined
, Language.TypeScript.Syntax.ClassHeritage
, Language.TypeScript.Syntax.AbstractClass
, Language.TypeScript.Syntax.ExtendsClause
@ -528,6 +529,12 @@ data Super a = Super
instance Eq1 Super where liftEq = genericLiftEq
instance Show1 Super where liftShowsPrec = genericLiftShowsPrec
data Undefined a = Undefined
deriving (Diffable, Eq, Foldable, Functor, GAlign, Generic1, Show, Traversable)
instance Eq1 Undefined where liftEq = genericLiftEq
instance Show1 Undefined where liftShowsPrec = genericLiftShowsPrec
data ClassHeritage a = ClassHeritage { classHeritageExtendsClause :: !a, implementsClause :: !a }
deriving (Diffable, Eq, Foldable, Functor, GAlign, Generic1, Show, Traversable)
@ -655,9 +662,11 @@ expression = handleError $
<|> true
<|> false
<|> null'
<|> undefined
<|> undefined'
<|> identifier
undefined' = makeTerm <$> symbol Grammar.Undefined <*> children (Language.TypeScript.Syntax.Undefined <$ source)
assignmentExpression = makeTerm' <$> symbol AssignmentExpression <*> children (infixTerm (memberExpression <|> subscriptExpression <|> identifier <|> destructuringPattern) expression [
assign Expression.Plus <$ symbol AnonPlusEqual
, assign Expression.Minus <$ symbol AnonMinusEqual