mirror of
https://github.com/github/semantic.git
synced 2024-11-24 08:54:07 +03:00
Assign infix data constructors
This commit is contained in:
parent
5dd83b0f2e
commit
df279bd24a
@ -78,6 +78,7 @@ type Syntax = '[
|
||||
, Syntax.Import
|
||||
, Syntax.ImportAlias
|
||||
, Syntax.ImportDeclaration
|
||||
, Syntax.InfixDataConstructor
|
||||
, Syntax.InfixOperatorPattern
|
||||
, Syntax.Instance
|
||||
, Syntax.IrrefutablePattern
|
||||
@ -211,6 +212,7 @@ conditionalExpression = makeTerm <$> symbol ConditionalExpression <*> children (
|
||||
constructor :: Assignment
|
||||
constructor = (makeTerm <$> symbol DataConstructor <*> children (Declaration.Constructor <$> manyTerm (context' <|> scopedTypeVariables) <*> typeConstructor <*> typeParameters))
|
||||
<|> term (makeTerm <$> symbol RecordDataConstructor <*> children (Syntax.RecordDataConstructor <$> constructorIdentifier <*> (term fields)))
|
||||
<|> term (makeTerm <$> symbol InfixDataConstructor <*> children (Syntax.InfixDataConstructor <$> expression <*> expression <*> expression))
|
||||
|
||||
constructorIdentifier :: Assignment
|
||||
constructorIdentifier = makeTerm <$> symbol ConstructorIdentifier <*> (Syntax.ConstructorIdentifier . Name.name <$> source)
|
||||
|
Loading…
Reference in New Issue
Block a user