mirror of
https://github.com/github/semantic.git
synced 2024-11-24 00:42:33 +03:00
Assign infix operator applications
This commit is contained in:
parent
bb48fe6d50
commit
7c38ddf4a2
@ -214,6 +214,7 @@ expressionChoices = [
|
|||||||
, generator
|
, generator
|
||||||
, importAlias
|
, importAlias
|
||||||
, importDeclaration
|
, importDeclaration
|
||||||
|
, infixOperatorApp
|
||||||
, infixOperatorPattern
|
, infixOperatorPattern
|
||||||
, infixVariableIdentifier
|
, infixVariableIdentifier
|
||||||
, integer
|
, integer
|
||||||
@ -342,6 +343,9 @@ importDeclaration = makeTerm
|
|||||||
importSpec :: Assignment.Assignment [] Grammar [Term]
|
importSpec :: Assignment.Assignment [] Grammar [Term]
|
||||||
importSpec = symbol ImportSpec *> children (manyTerm import')
|
importSpec = symbol ImportSpec *> children (manyTerm import')
|
||||||
|
|
||||||
|
infixOperatorApp :: Assignment
|
||||||
|
infixOperatorApp = makeTerm <$> symbol InfixOperatorApplication <*> children (Syntax.InfixOperatorApp <$> expression <*> expression <*> expression)
|
||||||
|
|
||||||
infixOperatorPattern :: Assignment
|
infixOperatorPattern :: Assignment
|
||||||
infixOperatorPattern = makeTerm <$> symbol InfixOperatorPattern <*> children (Syntax.InfixOperatorPattern <$> expression <*> operator <*> expression)
|
infixOperatorPattern = makeTerm <$> symbol InfixOperatorPattern <*> children (Syntax.InfixOperatorPattern <$> expression <*> operator <*> expression)
|
||||||
|
|
||||||
|
@ -448,6 +448,7 @@ instance Show1 ImportAlias where liftShowsPrec = genericLiftShowsPrec
|
|||||||
instance Evaluatable ImportAlias
|
instance Evaluatable ImportAlias
|
||||||
|
|
||||||
data App a = App { appLeft :: a, appRight :: a }
|
data App a = App { appLeft :: a, appRight :: a }
|
||||||
|
| InfixOperatorApp { appLeft :: a, infixOperator :: a, appRight :: a }
|
||||||
deriving (Declarations1, Diffable, Eq, Foldable, FreeVariables1, Functor, Generic1, Hashable1, Mergeable, Ord, Show, ToJSONFields1, Traversable)
|
deriving (Declarations1, Diffable, Eq, Foldable, FreeVariables1, Functor, Generic1, Hashable1, Mergeable, Ord, Show, ToJSONFields1, Traversable)
|
||||||
|
|
||||||
instance Eq1 App where liftEq = genericLiftEq
|
instance Eq1 App where liftEq = genericLiftEq
|
||||||
|
Loading…
Reference in New Issue
Block a user