summaryrefslogtreecommitdiff
path: root/src/eval/func.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/eval/func.rs')
-rw-r--r--src/eval/func.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/eval/func.rs b/src/eval/func.rs
index faf2d696..29b85f7a 100644
--- a/src/eval/func.rs
+++ b/src/eval/func.rs
@@ -274,6 +274,8 @@ pub enum Param {
Named(Ident, Value),
/// An argument sink: `..args`.
Sink(Option<Ident>),
+ /// A placeholder: `_`.
+ Placeholder,
}
impl Closure {
@@ -334,6 +336,9 @@ impl Closure {
args.named::<Value>(ident)?.unwrap_or_else(|| default.clone());
vm.define(ident.clone(), value);
}
+ Param::Placeholder => {
+ args.eat::<Value>()?;
+ }
}
}