mirror of
https://github.com/github/semantic.git
synced 2024-11-28 01:47:01 +03:00
🔥 askLoc.
This commit is contained in:
parent
ef36ded16c
commit
f15feb0ca3
@ -102,7 +102,7 @@ scopeGraphAnalysis
|
||||
scopeGraphAnalysis = Analysis{..}
|
||||
where alloc = pure
|
||||
bind name _ m = do
|
||||
loc <- askLoc
|
||||
loc <- Loc <$> ask <*> ask
|
||||
local (Map.insert name loc) m
|
||||
lookupEnv = pure . Just
|
||||
deref addr = do
|
||||
@ -136,6 +136,5 @@ scopeGraphAnalysis = Analysis{..}
|
||||
_ ... m = pure (Just m)
|
||||
|
||||
askRef = Ref <$> ask <*> ask
|
||||
askLoc = Loc <$> ask <*> ask
|
||||
|
||||
extendBinding addr ref bindLoc = ScopeGraph (maybe Map.empty (\ (Loc path span) -> Map.singleton (Decl addr path span) (Set.singleton ref)) bindLoc)
|
||||
|
Loading…
Reference in New Issue
Block a user