mirror of
https://github.com/github/semantic.git
synced 2024-12-24 23:42:31 +03:00
Generalize newConstructor over expressions
This commit is contained in:
parent
7a4b2da299
commit
462ed79752
@ -616,7 +616,7 @@ negativeLiteral :: Assignment
|
||||
negativeLiteral = makeTerm <$> symbol NegativeLiteral <*> children (Syntax.NegativeLiteral <$> expression)
|
||||
|
||||
newConstructor :: Assignment
|
||||
newConstructor = makeTerm <$> symbol NewConstructor <*> children (Declaration.Constructor <$> manyTerm (context' <|> scopedTypeVariables) <*> typeConstructor <*> typeParameters)
|
||||
newConstructor = makeTerm <$> symbol NewConstructor <*> children (Declaration.Constructor <$> manyTerm (context' <|> scopedTypeVariables) <*> expression <*> expressions)
|
||||
|
||||
newType :: Assignment
|
||||
newType = makeTerm <$> symbol NewtypeDeclaration <*> children (Syntax.NewType <$> manyTerm (context' <|> scopedTypeVariables) <*> typeLeft <*> newConstructor <*> (derivingClause <|> emptyTerm))
|
||||
|
Loading…
Reference in New Issue
Block a user