Rename MemoryItem to KclValue (#3378)

As @jon points out, "It's not only used in ProgramMemory. It's also
used as the return value of functions and as what gets substituted in
for the pipe substitution symbol %"
This commit is contained in:
Adam Chalmers
2024-08-12 16:53:24 -05:00
committed by GitHub
parent 13986fcfd7
commit 3dabab2c74
37 changed files with 335 additions and 335 deletions

View File

@ -8,7 +8,7 @@ use serde::{Deserialize, Serialize};
use crate::{
ast::types::TagDeclarator,
errors::KclError,
executor::MemoryItem,
executor::KclValue,
std::{Args, SketchGroup, SketchSurface},
};
@ -22,12 +22,12 @@ pub enum SketchSurfaceOrGroup {
}
/// Sketch a circle.
pub async fn circle(args: Args) -> Result<MemoryItem, KclError> {
pub async fn circle(args: Args) -> Result<KclValue, KclError> {
let (center, radius, sketch_surface_or_group, tag): ([f64; 2], f64, SketchSurfaceOrGroup, Option<TagDeclarator>) =
args.get_circle_args()?;
let sketch_group = inner_circle(center, radius, sketch_surface_or_group, tag, args).await?;
Ok(MemoryItem::SketchGroup(sketch_group))
Ok(KclValue::SketchGroup(sketch_group))
}
/// Construct a 2-dimensional circle, of the specified radius, centered at