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:
@@ -252,11 +252,10 @@ impl Parser {
|
||||
end_position: end_position.end_position,
|
||||
};
|
||||
|
||||
let mut guard: Option<Box<Expr>> = None;
|
||||
let mut guard: Option<Box<AstNode<Expr>>> = None;
|
||||
if self.peek().token_type == TokenType::LeftBrace {
|
||||
self.consume(TokenType::LeftBrace, "Expected '{' after guard expression")?;
|
||||
println!("ho trovato una guradia");
|
||||
guard = Some(Box::new(self.expression()?.node.clone()));
|
||||
guard = Some(Box::new(self.expression()?));
|
||||
self.consume(TokenType::RightBrace, "Expected '}' after guard expression")?;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user