]>
Commit | Line | Data |
---|---|---|
83ffe9cd | 1 | // Copyright (C) 2020-2023 Free Software Foundation, Inc. |
c6c3db21 PH |
2 | |
3 | // This file is part of GCC. | |
4 | ||
5 | // GCC is free software; you can redistribute it and/or modify it under | |
6 | // the terms of the GNU General Public License as published by the Free | |
7 | // Software Foundation; either version 3, or (at your option) any later | |
8 | // version. | |
9 | ||
10 | // GCC is distributed in the hope that it will be useful, but WITHOUT ANY | |
11 | // WARRANTY; without even the implied warranty of MERCHANTABILITY or | |
12 | // FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | |
13 | // for more details. | |
14 | ||
15 | // You should have received a copy of the GNU General Public License | |
16 | // along with GCC; see the file COPYING3. If not see | |
17 | // <http://www.gnu.org/licenses/>. | |
18 | ||
19 | #ifndef RUST_HIR_TYPE_CHECK_TOPLEVEL | |
20 | #define RUST_HIR_TYPE_CHECK_TOPLEVEL | |
21 | ||
22 | #include "rust-hir-type-check-base.h" | |
23 | ||
24 | namespace Rust { | |
25 | namespace Resolver { | |
26 | ||
27 | class TypeCheckTopLevel : private TypeCheckBase, public HIR::HIRVisItemVisitor | |
28 | { | |
29 | public: | |
30 | static void Resolve (HIR::Item &item); | |
31 | ||
32 | void visit (HIR::Module &module) override; | |
33 | void visit (HIR::Function &function) override; | |
34 | void visit (HIR::TypeAlias &alias) override; | |
35 | void visit (HIR::TupleStruct &struct_decl) override; | |
36 | void visit (HIR::StructStruct &struct_decl) override; | |
37 | void visit (HIR::Enum &enum_decl) override; | |
38 | void visit (HIR::Union &union_decl) override; | |
39 | void visit (HIR::StaticItem &var) override; | |
40 | void visit (HIR::ConstantItem &constant) override; | |
41 | void visit (HIR::ImplBlock &impl_block) override; | |
42 | void visit (HIR::ExternBlock &extern_block) override; | |
43 | ||
44 | // nothing to do | |
45 | void visit (HIR::Trait &trait_block) override {} | |
46 | void visit (HIR::ExternCrate &crate) override {} | |
47 | void visit (HIR::UseDeclaration &use_decl) override {} | |
48 | ||
49 | private: | |
50 | TypeCheckTopLevel (); | |
51 | }; | |
52 | ||
53 | } // namespace Resolver | |
54 | } // namespace Rust | |
55 | ||
56 | #endif // RUST_HIR_TYPE_CHECK_TOPLEVEL |