Refactor Call to include is_tail flag

The `TailCall` variant has been merged into `Call` by adding an
`is_tail` boolean field. This simplifies the AST by reducing the number
of node variants and makes it easier to handle tail call optimization.
The `tco.rs` module is responsible for setting this flag when a call
occurs in tail position.
This commit is contained in:
Michael Schimmel
2026-02-21 21:12:20 +01:00
parent f980d9befc
commit 78dff07930
9 changed files with 41 additions and 109 deletions
+1 -1
View File
@@ -57,7 +57,7 @@ impl<'a> LambdaCollector<'a> {
self.visit(value);
}
BoundKind::Call { callee, args } | BoundKind::TailCall { callee, args } => {
BoundKind::Call { callee, args, .. } => {
self.visit(callee);
self.visit(args);
}