mirror of
https://github.com/github/semantic.git
synced 2024-12-22 06:11:49 +03:00
ruby: implement Send
This commit is contained in:
parent
4f30c84add
commit
1b998409d3
@ -44,7 +44,12 @@ instance Ord1 Send where liftCompare = genericLiftCompare
|
||||
instance Show1 Send where liftShowsPrec = genericLiftShowsPrec
|
||||
|
||||
instance Evaluatable Send where
|
||||
eval (Send _ _ _ _) = fail "send unimplemented!"
|
||||
eval Send{..} = do
|
||||
recvEnv <- case sendReceiver of
|
||||
Just recv -> subtermValue recv >>= scopedEnvironment
|
||||
Nothing -> getEnv -- send to implicit self
|
||||
func <- localEnv (mappend recvEnv) (subtermValue sendSelector)
|
||||
call func (map subtermValue sendArgs) -- TODO pass through sendBlock
|
||||
|
||||
data Require a = Require { requireRelative :: Bool, requirePath :: !a }
|
||||
deriving (Diffable, Eq, Foldable, Functor, GAlign, Generic1, Mergeable, Ord, Show, Traversable, FreeVariables1)
|
||||
|
Loading…
Reference in New Issue
Block a user