fn foward_declare(&mut self, ast: &AST) {
        for node in &ast.items {
            match node {
                Stmt::FunDeclaration(fun, _) => {
                    self.local_scope()
                        .add_local(&fun.id.name, Symbol::from(fun));
                }
                Stmt::ClassDeclaration(class, _) => {
                    self.local_scope()
                        .add_local(&class.id.name, Symbol::from(class));
                }
                _ => continue,
            }
        }
    }
/// Add all functions declared in the global scope to
/// the current symbol table.
Add all functions declared in the global scope to
the current symbol table.
Add all functions declared in the global scope to the current symbol table .
fn foward_declare(&mut self, ast: &AST) {
        for node in &ast.items {
            match node {
                Stmt::FunDeclaration(fun, _) => {
                    self.local_scope()
                        .add_local(&fun.id.name, Symbol::from(fun));
                }
                Stmt::ClassDeclaration(class, _) => {
                    self.local_scope()
                        .add_local(&class.id.name, Symbol::from(class));
                }
                _ => continue,
            }
        }
    }
fn foward_declare ( & mut self , ast : & AST ) { for node in & ast . items { match node { Stmt :: FunDeclaration ( fun , _ ) => { self . local_scope ( ) . add_local ( & fun . id . name , Symbol :: from ( fun ) ) ; } Stmt :: ClassDeclaration ( class , _ ) => { self . local_scope ( ) . add_local ( & class . id . name , Symbol :: from ( class ) ) ; } _ => continue , } } }
Add all functions declared in the global scope to
the current symbol table.
Add all functions declared in the global scope to the current symbol table .
&mut self
ast
&AST