feat(tvix/eval): implement attribute set access operator
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>
This commit is contained in:
parent
671915837a
commit
20f5ccefeb
5 changed files with 65 additions and 4 deletions
|
|
@ -10,6 +10,10 @@ pub enum Error {
|
|||
given: &'static str,
|
||||
},
|
||||
|
||||
AttributeNotFound {
|
||||
name: String,
|
||||
},
|
||||
|
||||
TypeError {
|
||||
expected: &'static str,
|
||||
actual: &'static str,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue