]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/rust/typecheck/rust-hir-type-check-stmt.h
Update copyright years.
[thirdparty/gcc.git] / gcc / rust / typecheck / rust-hir-type-check-stmt.h
1 // Copyright (C) 2020-2023 Free Software Foundation, Inc.
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_STMT
20 #define RUST_HIR_TYPE_CHECK_STMT
21
22 #include "rust-hir-type-check-base.h"
23
24 namespace Rust {
25 namespace Resolver {
26
27 class TypeCheckStmt : private TypeCheckBase, private HIR::HIRStmtVisitor
28 {
29 public:
30 static TyTy::BaseType *Resolve (HIR::Stmt *stmt);
31
32 void visit (HIR::ExprStmtWithBlock &stmt) override;
33 void visit (HIR::ExprStmtWithoutBlock &stmt) override;
34 void visit (HIR::EmptyStmt &stmt) override;
35 void visit (HIR::ExternBlock &extern_block) override;
36 void visit (HIR::ConstantItem &constant) override;
37 void visit (HIR::LetStmt &stmt) override;
38 void visit (HIR::TupleStruct &struct_decl) override;
39 void visit (HIR::Enum &enum_decl) override;
40 void visit (HIR::StructStruct &struct_decl) override;
41 void visit (HIR::Union &union_decl) override;
42 void visit (HIR::Function &function) override;
43
44 void visit (HIR::EnumItemTuple &) override
45 { /* TODO? */
46 }
47 void visit (HIR::EnumItemStruct &) override
48 { /* TODO? */
49 }
50 void visit (HIR::EnumItem &item) override
51 { /* TODO? */
52 }
53 void visit (HIR::EnumItemDiscriminant &) override
54 { /* TODO? */
55 }
56 void visit (HIR::TypePathSegmentFunction &segment) override
57 { /* TODO? */
58 }
59 void visit (HIR::TypePath &path) override
60 { /* TODO? */
61 }
62 void visit (HIR::QualifiedPathInType &path) override
63 { /* TODO? */
64 }
65 void visit (HIR::Module &module) override
66 { /* TODO? */
67 }
68 void visit (HIR::ExternCrate &crate) override
69 { /* TODO? */
70 }
71 void visit (HIR::UseDeclaration &use_decl) override
72 { /* TODO? */
73 }
74 void visit (HIR::TypeAlias &type_alias) override
75 { /* TODO? */
76 }
77 void visit (HIR::StaticItem &static_item) override
78 { /* TODO? */
79 }
80 void visit (HIR::Trait &trait) override
81 { /* TODO? */
82 }
83 void visit (HIR::ImplBlock &impl) override
84 { /* TODO? */
85 }
86
87 private:
88 TypeCheckStmt () : TypeCheckBase (), infered (nullptr) {}
89
90 TyTy::BaseType *infered;
91 };
92
93 } // namespace Resolver
94 } // namespace Rust
95
96 #endif // RUST_HIR_TYPE_CHECK_STMT