mirror of
https://github.com/github/semantic.git
synced 2024-12-29 18:06:14 +03:00
Change ExtendsClause to manyTerm (typeReference <|> expression)
This commit is contained in:
parent
06f2b2e0df
commit
562d493ccf
@ -288,7 +288,10 @@ classHeritage' :: HasCallStack => Assignment.Assignment [] Grammar [Term]
|
||||
classHeritage' = symbol Grammar.ClassHeritage *> children (((++) `on` toList) <$> optional (term extendsClause) <*> optional (term implementsClause'))
|
||||
|
||||
extendsClause :: Assignment
|
||||
extendsClause = makeTerm <$> symbol Grammar.ExtendsClause <*> children (TypeScript.Syntax.ExtendsClause <$> term (expression <|> typeIdentifier) <*> (term typeArguments' <|> emptyTerm))
|
||||
extendsClause = makeTerm <$> symbol Grammar.ExtendsClause <*> children (TypeScript.Syntax.ExtendsClause <$> manyTerm (typeReference <|> expression))
|
||||
|
||||
typeReference :: Assignment
|
||||
typeReference = typeIdentifier <|> nestedTypeIdentifier <|> genericType
|
||||
|
||||
implementsClause' :: Assignment
|
||||
implementsClause' = makeTerm <$> symbol Grammar.ImplementsClause <*> children (TypeScript.Syntax.ImplementsClause <$> manyTerm ty)
|
||||
|
@ -228,7 +228,7 @@ instance Eq1 EnumDeclaration where liftEq = genericLiftEq
|
||||
instance Ord1 EnumDeclaration where liftCompare = genericLiftCompare
|
||||
instance Show1 EnumDeclaration where liftShowsPrec = genericLiftShowsPrec
|
||||
|
||||
data ExtendsClause a = ExtendsClause { _extendsSubject :: a, _extendsTypeArguments :: a }
|
||||
data ExtendsClause a = ExtendsClause { _extendsClauses :: [a] }
|
||||
deriving (Diffable, Eq, Foldable, Functor, GAlign, Generic1, Mergeable, Ord, Show, Traversable)
|
||||
|
||||
instance Eq1 ExtendsClause where liftEq = genericLiftEq
|
||||
|
Loading…
Reference in New Issue
Block a user