diff options
author | Vincent Ambo <mail@tazj.in> | 2022-08-07T20·40+0300 |
---|---|---|
committer | tazjin <tazjin@tvl.su> | 2022-08-12T12·39+0000 |
commit | 8b7d2fd59e12da150c69cb3ee7bb26a55355e439 (patch) | |
tree | 50d787cda826cc2289327a768f455ba931c9c62d | |
parent | bef8d67b6ce36bd267807de09d77b8da9c6921ab (diff) |
feat(tvix/eval): add initial value representation r/4403
Change-Id: I427a04e89994662df2750dffe21991bad48aab15 Reviewed-on: https://cl.tvl.fyi/c/depot/+/6066 Tested-by: BuildkiteCI Reviewed-by: grfn <grfn@gws.fyi>
-rw-r--r-- | tvix/eval/src/main.rs | 1 | ||||
-rw-r--r-- | tvix/eval/src/value.rs | 10 |
2 files changed, 11 insertions, 0 deletions
diff --git a/tvix/eval/src/main.rs b/tvix/eval/src/main.rs index 8192965a8b61..7cc5a380e525 100644 --- a/tvix/eval/src/main.rs +++ b/tvix/eval/src/main.rs @@ -6,6 +6,7 @@ use std::{ mod errors; mod eval; +mod value; fn main() { let mut args = env::args(); diff --git a/tvix/eval/src/value.rs b/tvix/eval/src/value.rs new file mode 100644 index 000000000000..037284b144b2 --- /dev/null +++ b/tvix/eval/src/value.rs @@ -0,0 +1,10 @@ +//! This module implements the backing representation of runtime +//! values in the Nix language. + +#[derive(Clone, Copy, Debug, PartialEq)] +pub enum Value { + Null, + Bool(bool), + Integer(i64), + Float(f64), +} |