Skip to main content

luaur_analysis/records/
identifier.rs

1use alloc::string::String;
2use luaur_ast::records::ast_local::AstLocal;
3
4#[derive(Debug, Clone, PartialEq, Eq, Hash)]
5pub struct Identifier {
6    pub(crate) name: String,
7    pub(crate) ctx: *const AstLocal,
8}
9
10impl Identifier {
11    pub fn new(name: String, ctx: *const AstLocal) -> Self {
12        Self { name, ctx }
13    }
14}
15
16#[allow(non_snake_case)]
17impl Identifier {
18    pub fn name(&self) -> &str {
19        &self.name
20    }
21
22    pub fn ctx(&self) -> *const AstLocal {
23        self.ctx
24    }
25}