about summary refs log tree commit diff
path: root/tvix/eval/src/value
diff options
context:
space:
mode:
authorFlorian Klink <flokli@flokli.de>2024-01-23T13·34+0200
committerclbot <clbot@tvl.fyi>2024-01-25T11·37+0000
commit023e372583b7bcc71b5c301c49501cc72204068f (patch)
tree6ea7a216292fb4db2154285371535b714fff498d /tvix/eval/src/value
parente1d25891638597b0085033fd99814fce83fab4b9 (diff)
feat(tvix/eval): track pattern binding names r/7448
These need to be preserved at least for builtins.toXML.

Also, we incorrectly only wrote an <attrspat> in case ellipsis was true,
but that's not the case.

Change-Id: I6bff9c47c2922f878d5c43e48280cda9c9ddb692
Reviewed-on: https://cl.tvl.fyi/c/depot/+/10686
Tested-by: BuildkiteCI
Autosubmit: flokli <flokli@flokli.de>
Reviewed-by: aspen <root@gws.fyi>
Diffstat (limited to 'tvix/eval/src/value')
-rw-r--r--tvix/eval/src/value/function.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/tvix/eval/src/value/function.rs b/tvix/eval/src/value/function.rs
index 8131cffa0230..7592e3d64164 100644
--- a/tvix/eval/src/value/function.rs
+++ b/tvix/eval/src/value/function.rs
@@ -18,6 +18,10 @@ pub(crate) struct Formals {
 
     /// The span of the formals themselves, to use to emit errors
     pub(crate) span: Span,
+
+    /// Optionally tracks a name for all function arguments (args@ style).
+    /// Used by toXML.
+    pub(crate) name: Option<String>,
 }
 
 impl Formals {