mirror of
https://github.com/github/semantic.git
synced 2025-01-01 19:55:34 +03:00
Evaluate Expression.Delete using ref.
This commit is contained in:
parent
3d2ced84c3
commit
0adaad3ba0
@ -353,11 +353,7 @@ instance Ord1 Delete where liftCompare = genericLiftCompare
|
||||
instance Show1 Delete where liftShowsPrec = genericLiftShowsPrec
|
||||
|
||||
instance Evaluatable Delete where
|
||||
eval eval _ (Delete a) = do
|
||||
valueRef <- eval a
|
||||
case valueRef of
|
||||
LvalMember addr -> dealloc addr >> rvalBox unit
|
||||
Rval val -> throwEvalError (DerefError val)
|
||||
eval _ ref (Delete a) = ref a >>= dealloc >> rvalBox unit
|
||||
|
||||
-- | A sequence expression such as Javascript or C's comma operator.
|
||||
data SequenceExpression a = SequenceExpression { firstExpression :: !a, secondExpression :: !a }
|
||||
|
Loading…
Reference in New Issue
Block a user