Public Member Functions | |
| Scopes (AST &ast) | |
| AST & | ast () const |
| Error & | error () const |
| Scope & | top () |
| const Decl * | dummy () const |
| void | push () |
| void | push (Scope &scope) |
| void | pop () |
| size_t | push_barrier (Scope &scope) |
| A file must not see the scope of whoever imports it, so its Scope becomes the new lookup floor. | |
| void | pop_barrier (size_t old) |
| const Decl * | find (Dbg dbg, bool quiet=false) |
| const Decl * | find_shadowed_module (Sym sym) |
Diagnostic-only: is a module named sym reachable, shadowed by whatever find would actually return? | |
| void | bind (Dbg dbg, const Decl *decl, bool rebind=false, bool quiet=false) |
| void | bind (Dbg dbg, const Decl *decl, Vis vis, bool rebind=false, bool quiet=false) |
Binds decl under dbg with an explicit vis - a splice re-exports under its own visibility. | |
Annex nesting | |
Tracked by ModDecl::bind so AST::name2annex can derive tag/sub from lexical nesting. | |
| void | push_mod (Sym name) |
| void | pop_mod () |
| size_t | mod_depth () const |
| Sym | enclosing_mod () const |
|
inline |
Definition at line 21 of file bind.cpp.
Referenced by mim::ast::File::bind().
|
inline |
|
inline |
Definition at line 90 of file bind.cpp.
References bind(), and mim::ast::Decl::vis().
Referenced by bind(), find(), and find_shadowed_module().
|
inline |
Binds decl under dbg with an explicit vis - a splice re-exports under its own visibility.
Definition at line 95 of file bind.cpp.
References error(), find_shadowed_module(), mim::ast::Decl::scope(), and top().
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Definition at line 35 of file bind.cpp.
Referenced by pop_barrier().
|
inline |
|
inline |
Definition at line 32 of file bind.cpp.
Referenced by push_barrier(), and Scopes().
|
inline |
|
inline |