diff options
author | Philip Herron <philip.herron@embecosm.com> | 2021-07-26 17:34:02 +0100 |
---|---|---|
committer | Philip Herron <philip.herron@embecosm.com> | 2021-07-26 17:38:51 +0100 |
commit | 5f238bc0fdc083a692a72a39ab1d5890dbb6f338 (patch) | |
tree | 4d46ebe04691b12dcbc4ffcdbe1939bdf42a85fe /gcc/rust/resolve/rust-ast-resolve-toplevel.h | |
parent | 5b3909dd7487ddd41ffacf45150a4fff550e2fab (diff) | |
download | gcc-5f238bc0fdc083a692a72a39ab1d5890dbb6f338.zip gcc-5f238bc0fdc083a692a72a39ab1d5890dbb6f338.tar.gz gcc-5f238bc0fdc083a692a72a39ab1d5890dbb6f338.tar.bz2 |
Add name-resolution and HIR lowering for extern blocks
This is the initial patch to do the ground work to support extern blocks.
Type resolution and Generic output still needs to be done to actually
support extern blocks.
Addresses #421
Diffstat (limited to 'gcc/rust/resolve/rust-ast-resolve-toplevel.h')
-rw-r--r-- | gcc/rust/resolve/rust-ast-resolve-toplevel.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/gcc/rust/resolve/rust-ast-resolve-toplevel.h b/gcc/rust/resolve/rust-ast-resolve-toplevel.h index 9abbb18..a042f5c 100644 --- a/gcc/rust/resolve/rust-ast-resolve-toplevel.h +++ b/gcc/rust/resolve/rust-ast-resolve-toplevel.h @@ -191,6 +191,14 @@ public: ResolveTopLevelTraitItems::go (item.get (), path); } + void visit (AST::ExternBlock &extern_block) override + { + for (auto &item : extern_block.get_extern_items ()) + { + ResolveToplevelExternItem::go (item.get (), prefix); + } + } + private: ResolveTopLevel (const CanonicalPath &prefix) : ResolverBase (UNKNOWN_NODEID), prefix (prefix) |