llmcc_python/descriptor/
variable.rs1#[derive(Debug, Clone)]
2pub struct VariableDescriptor {
3 pub name: String,
4 pub type_hint: Option<String>,
5 pub scope: VariableScope,
6}
7
8#[derive(Debug, Clone, Copy)]
9pub enum VariableScope {
10 Global,
11 ClassLevel,
12 FunctionLocal,
13}
14
15#[derive(Debug, Clone, Copy, PartialEq, Eq)]
16pub enum VariableKind {
17 Simple,
18 Tuple,
19 List,
20}
21
22impl VariableDescriptor {
23 pub fn new(name: String, scope: VariableScope) -> Self {
24 Self {
25 name,
26 type_hint: None,
27 scope,
28 }
29 }
30
31 pub fn with_type_hint(mut self, type_hint: String) -> Self {
32 self.type_hint = Some(type_hint);
33 self
34 }
35}