diff --git a/src/ast.rs b/src/ast.rs index 5c5093b..601ab18 100644 --- a/src/ast.rs +++ b/src/ast.rs @@ -62,6 +62,15 @@ pub struct VariableDeclarationStack impl VariableDeclarationStack { + pub fn new() -> Self + { + Self + { + free_variable_declarations: VariableDeclarations::new(), + bound_variable_declaration_stack: vec![], + } + } + pub fn find(&self, variable_name: &str) -> Option> { for variable_declarations in self.bound_variable_declaration_stack.iter().rev()