mirror of
https://github.com/github/semantic.git
synced 2024-12-27 08:54:14 +03:00
Simplify unaryOperator assignment
This commit is contained in:
parent
d44db9724e
commit
d7bd9c9b08
@ -58,9 +58,10 @@ expression :: HasCallStack => Assignment (Node Grammar) (Term Syntax Location)
|
||||
expression = identifier <|> statement <|> unaryOperator <|> tuple <|> literal
|
||||
|
||||
unaryOperator :: HasCallStack => Assignment (Node Grammar) (Term Syntax Location)
|
||||
unaryOperator = makeTerm <$> symbol UnaryOperator <*> children ( Expression.UCompliment <$> (symbol AnonTilde *> integer)
|
||||
<|> Expression.UMinus <$> (symbol AnonMinus *> integer)
|
||||
<|> Expression.UPlus <$> (symbol AnonPlus *> integer))
|
||||
unaryOperator = makeTerm <$> symbol UnaryOperator <*> children ( Expression.UCompliment <$> (symbol AnonTilde *> expression)
|
||||
<|> Expression.UMinus <$> (symbol AnonMinus *> expression)
|
||||
<|> Expression.UPlus <$> (symbol AnonPlus *> expression))
|
||||
|
||||
|
||||
identifier :: HasCallStack => Assignment (Node Grammar) (Term Syntax Location)
|
||||
identifier = makeTerm <$> symbol Identifier <*> (Syntax.Identifier <$> source)
|
||||
|
Loading…
Reference in New Issue
Block a user