Make environment generic and adapt closures

Added unit test
This commit is contained in:
Giulio Agostini
2026-06-29 20:50:29 +02:00
parent 4e2645e12d
commit 29c86d278d
30 changed files with 820 additions and 30 deletions
Regular → Executable
+1 -5
View File
@@ -106,11 +106,7 @@ impl LoxError {
LoxError::ParseError { source_slice, .. } => Some(source_slice.clone()),
LoxError::IoError { .. } => None,
LoxError::TypeMismatch { source_slice, .. } => Some(source_slice.clone()),
LoxError::Return {
value,
return_label,
..
} => None,
LoxError::Return { .. } => None,
}
}