1
1
mirror of https://github.com/github/semantic.git synced 2024-12-20 13:21:59 +03:00

Remove subterm uses

This commit is contained in:
joshvera 2018-11-02 16:18:49 -04:00
parent 29383adf7a
commit 2f3fc46e00
2 changed files with 4 additions and 4 deletions

View File

@ -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)

View File

@ -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