snix/tvix/eval/src
Vincent Ambo 57a723aaa9 feat(tvix/eval): implement trivial attribute set literals
Implements attribute set literals without nesting. Technically this
already supports dynamic key fragments (evaluating to strings), though
the only way to create these (interpolation) is not yet implemented.

However, creating simple attribute sets like `{ }`, or `{ a = 15; }`
or `{ a = 10 * 2; }` works.

Recursive attribute sets are not yet implemented as we do not have any
kind of scope access yet anyways.

This is implemented using a new instruction that creates an attribute
set with a given number of elements by popping key/value pairs off the
stack.

Change-Id: I0f9aac7a131a112d3f66b131297686b38aaeddf2
Reviewed-on: https://cl.tvl.fyi/c/depot/+/6091
Tested-by: BuildkiteCI
Reviewed-by: grfn <grfn@gws.fyi>
2022-08-13 15:31:50 +00:00
..
value feat(tvix/value): add some necessary helpers for strings 2022-08-13 11:50:37 +00:00
chunk.rs feat(tvix/eval): add initial chunk representation 2022-08-12 13:05:16 +00:00
compiler.rs feat(tvix/eval): implement trivial attribute set literals 2022-08-13 15:31:50 +00:00
errors.rs feat(tvix/eval): add error variant for runtime type errors 2022-08-12 13:24:10 +00:00
eval.rs fix(tvix/eval): print code even if runtime fails 2022-08-13 11:50:37 +00:00
main.rs chore(tvix/eval): wire things up for development flow 2022-08-12 13:05:28 +00:00
opcode.rs feat(tvix/eval): implement trivial attribute set literals 2022-08-13 15:31:50 +00:00
vm.rs feat(tvix/eval): implement trivial attribute set literals 2022-08-13 15:31:50 +00:00