Introduce closure AST node
The `Closure` struct has been moved from `ast/vm.rs` to a new module `ast/closure.rs`. This improves the organization of the AST nodes. The `Closure` struct represents a compiled function body along with its captured upvalues, which is a key feature for Myc Script.
This commit is contained in:
@@ -3,7 +3,8 @@ use crate::ast::compiler::binder::{Binder, CompilerScope, LocalInfo};
|
||||
use crate::ast::compiler::{CapturePass, TypeChecker, TypedNode};
|
||||
use crate::ast::nodes::{AnalyzedPhase, Symbol, SyntaxKind, SyntaxNode};
|
||||
use crate::ast::parser::Parser;
|
||||
use crate::ast::vm::{Closure, TracingObserver, VM};
|
||||
use crate::ast::closure::Closure;
|
||||
use crate::ast::vm::{TracingObserver, VM};
|
||||
use std::cell::RefCell;
|
||||
use std::collections::{HashMap, HashSet};
|
||||
use std::path::{Path, PathBuf};
|
||||
|
||||
Reference in New Issue
Block a user