luaur_analysis/records/
unknown_symbol.rs1#[allow(non_camel_case_types)]
2#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
3pub enum Context {
4 Binding,
5 Type,
6}
7
8#[derive(Debug, Clone, PartialEq, Eq, Hash)]
9pub struct UnknownSymbol {
10 pub(crate) name: alloc::string::String,
11 pub(crate) context: Context,
12}
13
14impl UnknownSymbol {
15 pub const fn new(name: alloc::string::String, context: Context) -> Self {
16 Self { name, context }
17 }
18}
19
20#[allow(non_snake_case)]
21impl UnknownSymbol {
22 pub fn name(&self) -> &str {
23 &self.name
24 }
25
26 pub fn context(&self) -> Context {
27 self.context
28 }
29}
30
31pub use Context as UnknownSymbol_Context;