about summary refs log tree commit diff
path: root/tvix/eval/src/errors.rs
diff options
context:
space:
mode:
authorVincent Ambo <mail@tazj.in>2022-08-11T12·29+0300
committertazjin <tazjin@tvl.su>2022-08-26T09·02+0000
commit20f5ccefeb88ce4b79369085977b674c612e8fed (patch)
treeb76f0bea439f792bc0f092f81e8871354c31b75b /tvix/eval/src/errors.rs
parent671915837aee2908431b1d1908352fc0ab9cd628 (diff)
feat(tvix/eval): implement attribute set access operator r/4492
Fairly straightforward, handling the optimised representations
manually and otherwise delegating to BTreeMap.

Note that parsing of raw identifiers is not yet implemented.

Encountering an identifier node usually means that there is locals
access going on, so we need a special case for compiling a node in
such a way that an identifier's literal value ends up on the stack.

Change-Id: I13fbab7ac657b17ef3f4c5859fe737c321890c8a
Reviewed-on: https://cl.tvl.fyi/c/depot/+/6158
Tested-by: BuildkiteCI
Reviewed-by: sterni <sternenseemann@systemli.org>
Reviewed-by: grfn <grfn@gws.fyi>
Diffstat (limited to 'tvix/eval/src/errors.rs')
-rw-r--r--tvix/eval/src/errors.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/tvix/eval/src/errors.rs b/tvix/eval/src/errors.rs
index f7f64f4e68..cba46c71f4 100644
--- a/tvix/eval/src/errors.rs
+++ b/tvix/eval/src/errors.rs
@@ -10,6 +10,10 @@ pub enum Error {
         given: &'static str,
     },
 
+    AttributeNotFound {
+        name: String,
+    },
+
     TypeError {
         expected: &'static str,
         actual: &'static str,