From a9869c212f7c1bc77a52e301ad014641b014e834 Mon Sep 17 00:00:00 2001 From: Laurenz Date: Thu, 26 May 2022 13:49:44 +0200 Subject: Locatable groups --- src/eval/args.rs | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/eval/args.rs') diff --git a/src/eval/args.rs b/src/eval/args.rs index 69e6aaee..4d280ff7 100644 --- a/src/eval/args.rs +++ b/src/eval/args.rs @@ -39,6 +39,15 @@ impl Args { Self { span, items } } + /// Push a positional argument. + pub fn push(&mut self, span: Span, value: Value) { + self.items.push(Arg { + span: self.span, + name: None, + value: Spanned::new(value, span), + }) + } + /// Consume and cast the first positional argument if there is one. pub fn eat(&mut self) -> TypResult> where -- cgit v1.2.3