Move variable resolution to middleend
- Introduce AST-based visitor and resolver in middleend - Update guard field and parser to use AstNode<Expr> - Remove backend variable_resolution and adjust exports - Expose middleend in the library
This commit is contained in:
@@ -314,7 +314,7 @@ pub struct LoxFunction {
|
||||
pub return_type: Option<String>,
|
||||
pub body: AstNode<Stmt>,
|
||||
pub closure: Option<EnvironmentStack<BaseValue>>,
|
||||
pub guard: Option<Box<Expr>>,
|
||||
pub guard: Option<Box<AstNode<Expr>>>,
|
||||
}
|
||||
|
||||
impl LoxFunction {
|
||||
@@ -322,7 +322,7 @@ impl LoxFunction {
|
||||
parameters: Vec<(String, String)>,
|
||||
body: AstNode<Stmt>,
|
||||
closure: Option<EnvironmentStack<BaseValue>>,
|
||||
guard: Option<Box<Expr>>,
|
||||
guard: Option<Box<AstNode<Expr>>>,
|
||||
) -> Self {
|
||||
LoxFunction {
|
||||
parameters,
|
||||
|
||||
Reference in New Issue
Block a user