blob: 6151fb6b61bd14134b45804c84d991e5f56ffad8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
/*
* MRustC - Rust Compiler
* - By John Hodge (Mutabah/thePowersGang)
*
* hir/expr_state.hpp
* - Extra state for expression pointers
*/
#pragma once
#include <hir/hir.hpp>
namespace HIR {
class ExprState
{
public:
::HIR::SimplePath m_mod_path;
const ::HIR::Module& m_module;
const ::HIR::GenericParams* m_impl_generics;
const ::HIR::GenericParams* m_item_generics;
::std::vector< ::std::pair< const ::HIR::SimplePath*, const ::HIR::Trait* > > m_traits;
enum class Stage {
Created,
TypecheckRequest,
Typecheck,
MirRequest,
Mir,
};
mutable Stage stage;
ExprState(const ::HIR::Module& mod_ptr, ::HIR::SimplePath mod_path):
m_mod_path(::std::move(mod_path)),
m_module(mod_ptr),
m_impl_generics(nullptr),
m_item_generics(nullptr),
stage(Stage::Created)
{
}
};
}
|