mirror of
https://github.com/github/semantic.git
synced 2025-01-07 07:58:12 +03:00
Assign pointer references
This commit is contained in:
parent
10f728d278
commit
4fe2ad2609
@ -271,10 +271,11 @@ parenthesizedExpression :: Assignment
|
|||||||
parenthesizedExpression = symbol ParenthesizedExpression *> children expressions
|
parenthesizedExpression = symbol ParenthesizedExpression *> children expressions
|
||||||
|
|
||||||
unaryExpression :: Assignment
|
unaryExpression :: Assignment
|
||||||
unaryExpression = symbol UnaryExpression >>= \ location -> (notExpression location) <|> (unaryMinus location) <|> unaryPlus
|
unaryExpression = symbol UnaryExpression >>= \ location -> (notExpression location) <|> (unaryMinus location) <|> unaryPlus <|> unaryAmpersand
|
||||||
where notExpression location = makeTerm location . Expression.Not <$> children (symbol AnonBang *> expression)
|
where notExpression location = makeTerm location . Expression.Not <$> children (symbol AnonBang *> expression)
|
||||||
unaryMinus location = makeTerm location . Expression.Negate <$> children (symbol AnonMinus *> expression)
|
unaryMinus location = makeTerm location . Expression.Negate <$> children (symbol AnonMinus *> expression)
|
||||||
unaryPlus = children (symbol AnonPlus *> expression)
|
unaryPlus = children (symbol AnonPlus *> expression)
|
||||||
|
unaryAmpersand = children (makeTerm <$> symbol AnonAmpersand <*> (Statement.Reference <$> expression))
|
||||||
|
|
||||||
binaryExpression :: Assignment
|
binaryExpression :: Assignment
|
||||||
binaryExpression = makeTerm' <$> symbol BinaryExpression <*> children (infixTerm expression expression
|
binaryExpression = makeTerm' <$> symbol BinaryExpression <*> children (infixTerm expression expression
|
||||||
|
Loading…
Reference in New Issue
Block a user