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:
parent
cb6df90b07
commit
0991bcdadc
@ -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))
|
||||
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user