From 6a3385e4e77ce7672bcc80941bf02c8218f344a2 Mon Sep 17 00:00:00 2001 From: Laurenz Date: Fri, 13 Aug 2021 16:39:52 +0200 Subject: Argument collection and spreading --- src/pretty.rs | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/pretty.rs') diff --git a/src/pretty.rs b/src/pretty.rs index 52300546..179e5d2d 100644 --- a/src/pretty.rs +++ b/src/pretty.rs @@ -357,6 +357,10 @@ impl Pretty for CallArg { match self { Self::Pos(expr) => expr.pretty(p), Self::Named(named) => named.pretty(p), + Self::Spread(expr) => { + p.push_str(".."); + expr.pretty(p); + } } } } @@ -375,6 +379,10 @@ impl Pretty for ClosureParam { match self { Self::Pos(ident) => ident.pretty(p), Self::Named(named) => named.pretty(p), + Self::Sink(ident) => { + p.push_str(".."); + ident.pretty(p); + } } } } @@ -496,6 +504,7 @@ impl Pretty for Value { Self::Dict(v) => v.pretty(p), Self::Template(v) => v.pretty(p), Self::Func(v) => v.pretty(p), + Self::Args(v) => v.pretty(p), Self::Dyn(v) => v.pretty(p), } } -- cgit v1.2.3