Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "ExpressionExplorer"
uuid = "21656369-7473-754a-2065-74616d696c43"
license = "MIT"
version = "1.1.3"
version = "1.1.4"
authors = ["Paul Berg <paul@plutojl.org>", "Fons van der Plas <fons@plutojl.org>"]

[deps]
Expand Down
6 changes: 4 additions & 2 deletions src/explore.jl
Original file line number Diff line number Diff line change
Expand Up @@ -769,7 +769,8 @@ end
function explore_module!(ex::Expr, scopestate::ScopeState)
# Does create it's own scope, but can import from outer scope, that's what `explore_module_definition!` is for
symstate = explore_module_definition!(ex, scopestate)
return union(symstate, SymbolsState(assignments = Set{Symbol}([ex.args[2]])))::SymbolsState
module_name_num = ex.args[1] isa VersionNumber ? 3 : 2
return union(symstate, SymbolsState(assignments = Set{Symbol}([ex.args[module_name_num]])))::SymbolsState
end

function explore_fallback!(ex::Expr, scopestate::ScopeState)
Expand Down Expand Up @@ -873,7 +874,8 @@ function explore_module_definition!(ex::Expr, scopestate; module_depth::Number =
return symstate
elseif ex.head === :module
# Explorer the block inside with one more depth added
return explore_module_definition!(ex.args[3], scopestate, module_depth = module_depth + 1)
block_num = ex.args[1] isa VersionNumber ? 4 : 3
return explore_module_definition!(ex.args[block_num], scopestate, module_depth = module_depth + 1)
elseif ex.head === :quote
# TODO? Explore interpolations, modules can't be in interpolations, but `import`'s can >_>
return SymbolsState()
Expand Down
Loading