mirror of
https://github.com/github/semantic.git
synced 2025-01-08 08:30:27 +03:00
implement Delete evaluatable
This commit is contained in:
parent
d8933a062b
commit
06c9e97b2d
@ -301,12 +301,11 @@ instance Ord1 Delete where liftCompare = genericLiftCompare
|
||||
instance Show1 Delete where liftShowsPrec = genericLiftShowsPrec
|
||||
|
||||
instance Evaluatable Delete where
|
||||
eval _ (Delete _) = do
|
||||
-- valueRef <- eval a
|
||||
-- addr <- address valueRef
|
||||
-- dealloc addr
|
||||
-- rvalBox unit
|
||||
undefined
|
||||
eval eval (Delete a) = do
|
||||
valueRef <- eval a
|
||||
case valueRef of
|
||||
LvalMember addr -> valueRef <$ dealloc addr
|
||||
Rval val -> throwEvalError (DerefError val)
|
||||
|
||||
-- | 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