feat(tvix/eval): implement unary negation operator

Change-Id: I5d012cc073e55d79d7b34b88283aab3164864293
Reviewed-on: https://cl.tvl.fyi/c/depot/+/6075
Tested-by: BuildkiteCI
Reviewed-by: grfn <grfn@gws.fyi>
This commit is contained in:
Vincent Ambo 2022-08-08 02:32:07 +03:00 committed by tazjin
parent d35ecc0caf
commit 72be759e1e
3 changed files with 35 additions and 1 deletions

View file

@ -17,9 +17,13 @@ pub enum OpCode {
OpTrue,
OpFalse,
// Simple binary operators
// Arithmetic binary operators
OpAdd,
OpSub,
OpMul,
OpDiv,
// Unary operators
OpInvert,
OpNegate,
}