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

@ -1,7 +1,7 @@
use anyhow::Result;
use kcl_lib::{
ast::{modify::modify_ast_for_sketch, types::Program},
executor::{ExecutorContext, MemoryItem, PlaneType, SourceRange},
executor::{ExecutorContext, KclValue, PlaneType, SourceRange},
};
use kittycad::types::{ModelingCmd, Point3D};
use pretty_assertions::assert_eq;
@ -39,7 +39,7 @@ async fn setup(code: &str, name: &str) -> Result<(ExecutorContext, Program, uuid
// We need to get the sketch ID.
// Get the sketch group ID from memory.
let MemoryItem::SketchGroup(sketch_group) = memory.get(name, SourceRange::default()).unwrap() else {
let KclValue::SketchGroup(sketch_group) = memory.get(name, SourceRange::default()).unwrap() else {
anyhow::bail!("part001 not found in memory: {:?}", memory);
};
let sketch_id = sketch_group.id;