feat(tvix/eval): compile simple let ... in ... expressions
These expressions now leave the binding values on the stack, and clean up the scope after the body of the expression. While variable access is not yet implemented (as the identifier node remains unhandled), this already gives us the correct stack behaviour. Change-Id: I138c20ace9c64502c94b2c0f99a6077cd912c00d Reviewed-on: https://cl.tvl.fyi/c/depot/+/6188 Tested-by: BuildkiteCI Reviewed-by: grfn <grfn@gws.fyi>
This commit is contained in:
parent
bbad338017
commit
691a596aac
3 changed files with 98 additions and 0 deletions
|
|
@ -61,4 +61,7 @@ pub enum OpCode {
|
|||
|
||||
// Type assertion operators
|
||||
OpAssertBool,
|
||||
|
||||
// Close scopes while leaving their expression value around.
|
||||
OpCloseScope(usize), // number of locals to pop
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue