mirror of
https://github.com/github/semantic.git
synced 2025-01-05 14:11:33 +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.JsxClosingElement
|
||||||
, TypeScript.Syntax.JsxExpression
|
, TypeScript.Syntax.JsxExpression
|
||||||
, TypeScript.Syntax.JsxAttribute
|
, TypeScript.Syntax.JsxAttribute
|
||||||
, TypeScript.Syntax.JsxMemberExpression
|
|
||||||
, TypeScript.Syntax.JsxFragment
|
, TypeScript.Syntax.JsxFragment
|
||||||
, TypeScript.Syntax.JsxNamespaceName
|
, TypeScript.Syntax.JsxNamespaceName
|
||||||
, TypeScript.Syntax.OptionalParameter
|
, TypeScript.Syntax.OptionalParameter
|
||||||
@ -376,14 +375,11 @@ jsxOpeningElement' :: Assignment
|
|||||||
jsxOpeningElement' = makeTerm <$> symbol Grammar.JsxOpeningElement <*> children (TypeScript.Syntax.JsxOpeningElement <$> term jsxElementName <*> manyTerm jsxAttribute')
|
jsxOpeningElement' = makeTerm <$> symbol Grammar.JsxOpeningElement <*> children (TypeScript.Syntax.JsxOpeningElement <$> term jsxElementName <*> manyTerm jsxAttribute')
|
||||||
|
|
||||||
jsxElementName :: Assignment
|
jsxElementName :: Assignment
|
||||||
jsxElementName = choice [ identifier, jsxMemberExpression, jsxNamespaceName ]
|
jsxElementName = choice [ identifier, nestedIdentifier, jsxNamespaceName ]
|
||||||
|
|
||||||
jsxNamespaceName :: Assignment
|
jsxNamespaceName :: Assignment
|
||||||
jsxNamespaceName = makeTerm <$> symbol Grammar.JsxNamespaceName <*> children (TypeScript.Syntax.JsxNamespaceName <$> identifier <*> identifier)
|
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' :: Assignment
|
||||||
jsxExpression' = makeTerm <$> symbol Grammar.JsxExpression <*> children (TypeScript.Syntax.JsxExpression <$> term (expressions <|> spreadElement <|> emptyTerm))
|
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 Eq1 JsxNamespaceName where liftEq = genericLiftEq
|
||||||
instance Ord1 JsxNamespaceName where liftCompare = genericLiftCompare
|
instance Ord1 JsxNamespaceName where liftCompare = genericLiftCompare
|
||||||
instance Show1 JsxNamespaceName where liftShowsPrec = genericLiftShowsPrec
|
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