microcad_lang/eval/call/argument.rs
1// Copyright © 2025 The µcad authors <info@ucad.xyz>
2// SPDX-License-Identifier: AGPL-3.0-or-later
3
4//! µcad value related evaluation entities
5
6use crate::{eval::*, syntax::*};
7
8impl Argument {
9 /// Evaluate `Argument` and return `ArgumentValue`
10 pub fn eval_value(&self, context: &mut Context) -> EvalResult<ArgumentValue> {
11 Ok(ArgumentValue::new(
12 self.value.eval(context)?,
13 self.value.single_identifier().cloned(),
14 self.src_ref.clone(),
15 ))
16 }
17}