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:
@ -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
|
||||
|
Reference in New Issue
Block a user