Add 'again' keyword for recursive calls
The `again` keyword is introduced to facilitate explicit recursive function calls. It is restricted to tail-call positions to prevent dead code and ensure TCO optimization. Type checking is enhanced to validate argument types against function parameters.
This commit is contained in:
@@ -86,6 +86,9 @@ pub enum UntypedKind {
|
||||
callee: Box<Node<UntypedKind>>,
|
||||
args: Box<Node<UntypedKind>>,
|
||||
},
|
||||
Again {
|
||||
args: Box<Node<UntypedKind>>,
|
||||
},
|
||||
Block {
|
||||
exprs: Vec<Node<UntypedKind>>,
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user