@@ -4,7 +4,7 @@ function resolve_import_block(x::EXPR, state::State, root, usinged, markfinal=tr
44 if x. args[2 ]. meta === nothing
55 x. args[2 ]. meta = Meta ()
66 end
7- if hasbinding (last (x. args[1 ]. args))
7+ if hasbinding (last (x. args[1 ]. args)) && CSTParser . isidentifier (x . args[ 2 ])
88 lhsbinding = bindingof (last (x. args[1 ]. args))
99 x. args[2 ]. meta. binding = Binding (x. args[2 ], lhsbinding. val, lhsbinding. type, lhsbinding. refs)
1010 setref! (x. args[2 ], bindingof (x. args[2 ]))
@@ -32,7 +32,7 @@ function resolve_import_block(x::EXPR, state::State, root, usinged, markfinal=tr
3232 return refof (arg)
3333 end
3434 else
35- return
35+ return
3636 end
3737 end
3838end
@@ -92,11 +92,11 @@ function add_to_imported_modules(scope::Scope, name::Symbol, val)
9292 end
9393end
9494no_modules_above (s:: Scope ) = ! CSTParser. defines_module (s. expr) || s. parent === nothing || no_modules_above (s. parent)
95- function get_named_toplevel_module (s, name)
95+ function get_named_toplevel_module (s, name)
9696 return nothing
9797end
9898function get_named_toplevel_module (s:: Scope , name:: String )
99- if CSTParser. defines_module (s. expr)
99+ if CSTParser. defines_module (s. expr)
100100 m_name = CSTParser. get_name (s. expr)
101101 if ((headof (m_name) === :IDENTIFIER && valof (m_name) == name) || headof (m_name) === :NONSTDIDENTIFIER && length (m_name. args) == 2 && valof (m_name. args[2 ]) == name) && no_modules_above (s)
102102 return s. expr
0 commit comments