mirror of
https://github.com/github/semantic.git
synced 2024-12-30 02:14:20 +03:00
Remove subterm uses
This commit is contained in:
parent
29383adf7a
commit
2f3fc46e00
@ -28,7 +28,7 @@ instance Evaluatable JavaScriptRequire where
|
||||
bindAll scopeGraph
|
||||
-- alias <- maybeM (throwEvalError NoNameError) (declaredName aliasTerm)
|
||||
-- rvalBox =<< evalRequire modulePath alias
|
||||
case declaredName (subterm aliasTerm) of
|
||||
case declaredName aliasTerm of
|
||||
Just alias -> do
|
||||
span <- get @Span
|
||||
void $ declare (Declaration alias) span (ScopeGraph.currentScope scopeGraph) -- TODO: declare shouldn't return a fake (Address address)
|
||||
|
@ -53,7 +53,7 @@ instance Evaluatable QualifiedAliasedImport where
|
||||
modulePath <- resolveWithNodejsStrategy importPath typescriptExtensions
|
||||
-- alias <- maybeM (throwEvalError NoNameError) (declaredName aliasTerm)
|
||||
-- rvalBox =<< evalRequire modulePath alias
|
||||
alias <- maybeM (throwEvalError NoNameError) (declaredName (subterm aliasTerm))
|
||||
alias <- maybeM (throwEvalError NoNameError) (declaredName aliasTerm)
|
||||
span <- get @Span
|
||||
(scopeGraph, value) <- require modulePath
|
||||
bindAll scopeGraph
|
||||
@ -87,10 +87,10 @@ instance Evaluatable QualifiedExport where
|
||||
-- -- Insert the aliases with no addresses.
|
||||
-- for_ exportSymbols $ \Alias{..} ->
|
||||
-- export aliasValue aliasName Nothing
|
||||
eval (QualifiedExport exportSymbols) = do
|
||||
eval _ (QualifiedExport exportSymbols) = do
|
||||
-- Create a Lexical edge from the qualifed export's scope to the current scope.
|
||||
currentScopeAddress <- currentScope
|
||||
let edges = Map.singleton Lexical [ currentScopeAddress ]
|
||||
let edges = maybe mempty (Map.singleton Lexical . pure) currentScopeAddress
|
||||
scopeAddress <- newScope edges
|
||||
putCurrentScope scopeAddress
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user