How to tell if code is being run in global scope?

See https://discourse.julialang.org/t/is-there-a-way-to-determine-whether-code-is-toplevel and https://discourse.julialang.org/t/should-macros-get-an-istoplevel-or-scope-argument

1 Like