1
1
mirror of https://github.com/github/semantic.git synced 2025-01-03 13:02:37 +03:00

Replace member expression with nested identifier

This commit is contained in:
joshvera 2018-02-16 16:32:32 -05:00
parent cb6df90b07
commit 0991bcdadc
2 changed files with 1 additions and 12 deletions

View File

@ -144,7 +144,6 @@ type Syntax = '[
, TypeScript.Syntax.JsxClosingElement
, TypeScript.Syntax.JsxExpression
, TypeScript.Syntax.JsxAttribute
, TypeScript.Syntax.JsxMemberExpression
, TypeScript.Syntax.JsxFragment
, TypeScript.Syntax.JsxNamespaceName
, TypeScript.Syntax.OptionalParameter
@ -376,14 +375,11 @@ jsxOpeningElement' :: Assignment
jsxOpeningElement' = makeTerm <$> symbol Grammar.JsxOpeningElement <*> children (TypeScript.Syntax.JsxOpeningElement <$> term jsxElementName <*> manyTerm jsxAttribute')
jsxElementName :: Assignment
jsxElementName = choice [ identifier, jsxMemberExpression, jsxNamespaceName ]
jsxElementName = choice [ identifier, nestedIdentifier, jsxNamespaceName ]
jsxNamespaceName :: Assignment
jsxNamespaceName = makeTerm <$> symbol Grammar.JsxNamespaceName <*> children (TypeScript.Syntax.JsxNamespaceName <$> identifier <*> identifier)
jsxMemberExpression :: Assignment
jsxMemberExpression = makeTerm <$> symbol Grammar.JsxMemberExpression <*> children (TypeScript.Syntax.JsxMemberExpression <$> manyTerm identifier)
jsxExpression' :: Assignment
jsxExpression' = makeTerm <$> symbol Grammar.JsxExpression <*> children (TypeScript.Syntax.JsxExpression <$> term (expressions <|> spreadElement <|> emptyTerm))

View File

@ -507,10 +507,3 @@ data JsxNamespaceName a = JsxNamespaceName a a
instance Eq1 JsxNamespaceName where liftEq = genericLiftEq
instance Ord1 JsxNamespaceName where liftCompare = genericLiftCompare
instance Show1 JsxNamespaceName where liftShowsPrec = genericLiftShowsPrec
data JsxMemberExpression a = JsxMemberExpression [a]
deriving (Diffable, Eq, Foldable, Functor, GAlign, Generic1, Mergeable, Ord, Show, Traversable)
instance Eq1 JsxMemberExpression where liftEq = genericLiftEq
instance Ord1 JsxMemberExpression where liftCompare = genericLiftCompare
instance Show1 JsxMemberExpression where liftShowsPrec = genericLiftShowsPrec