mirror of
https://github.com/github/semantic.git
synced 2025-01-06 23:46:21 +03:00
Update Go.QualifiedImport
This commit is contained in:
parent
3cebf1ac15
commit
6197b9941b
@ -75,11 +75,10 @@ data QualifiedImport a = QualifiedImport { qualifiedImportFrom :: !ImportPath, q
|
|||||||
instance Evaluatable QualifiedImport where
|
instance Evaluatable QualifiedImport where
|
||||||
eval _ _ (QualifiedImport importPath aliasTerm) = do
|
eval _ _ (QualifiedImport importPath aliasTerm) = do
|
||||||
paths <- resolveGoImport importPath
|
paths <- resolveGoImport importPath
|
||||||
alias <- maybeM (throwNoNameError aliasTerm) (declaredName aliasTerm)
|
|
||||||
span <- ask @Span
|
span <- ask @Span
|
||||||
scopeAddress <- newScope mempty
|
scopeAddress <- newScope mempty
|
||||||
declare (Declaration alias) Default Public span ScopeGraph.QualifiedImport (Just scopeAddress)
|
name <- declareMaybeName (declaredName aliasTerm) Default Public span ScopeGraph.QualifiedImport (Just scopeAddress)
|
||||||
aliasSlot <- lookupSlot (Declaration alias)
|
aliasSlot <- lookupSlot (Declaration name)
|
||||||
|
|
||||||
withScope scopeAddress $ do
|
withScope scopeAddress $ do
|
||||||
let
|
let
|
||||||
|
Loading…
Reference in New Issue
Block a user