mirror of
https://github.com/github/semantic.git
synced 2024-12-20 13:21:59 +03:00
Use maybeLookupDeclaration
Since self isn't necessarily defined for all languages.
This commit is contained in:
parent
9be3403d21
commit
493a69b8c5
@ -111,8 +111,8 @@ instance ( FreeVariables term
|
|||||||
withScopeAndFrame frameAddress $ do
|
withScopeAndFrame frameAddress $ do
|
||||||
case maybeThis of
|
case maybeThis of
|
||||||
Just object -> do
|
Just object -> do
|
||||||
slot <- lookupDeclaration (Declaration __semantic_self)
|
maybeSlot <- maybeLookupDeclaration (Declaration __semantic_self)
|
||||||
assign slot object
|
maybe (pure ()) (`assign` object) maybeSlot
|
||||||
Nothing -> pure ()
|
Nothing -> pure ()
|
||||||
for_ (zip names params) $ \(name, param) -> do
|
for_ (zip names params) $ \(name, param) -> do
|
||||||
addr <- lookupDeclaration (Declaration name)
|
addr <- lookupDeclaration (Declaration name)
|
||||||
|
Loading…
Reference in New Issue
Block a user