From 8b7d2fd59e12da150c69cb3ee7bb26a55355e439 Mon Sep 17 00:00:00 2001 From: Vincent Ambo Date: Sun, 7 Aug 2022 23:40:12 +0300 Subject: feat(tvix/eval): add initial value representation Change-Id: I427a04e89994662df2750dffe21991bad48aab15 Reviewed-on: https://cl.tvl.fyi/c/depot/+/6066 Tested-by: BuildkiteCI Reviewed-by: grfn --- tvix/eval/src/main.rs | 1 + tvix/eval/src/value.rs | 10 ++++++++++ 2 files changed, 11 insertions(+) create mode 100644 tvix/eval/src/value.rs (limited to 'tvix') 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), +} -- cgit 1.4.1