Misc tidying up around KclValue, etc. (#5653)

* Make some things a little less public

Signed-off-by: Nick Cameron <nrc@ncameron.org>

* Rename KclValue::Array to MixedArray

Signed-off-by: Nick Cameron <nrc@ncameron.org>

* Add settings to KclValue::Function

Signed-off-by: Nick Cameron <nrc@ncameron.org>

* Remove a bunch of dead code, simplifying mock exec and meaning KclValue no longer needs to deserialize

Signed-off-by: Nick Cameron <nrc@ncameron.org>

---------

Signed-off-by: Nick Cameron <nrc@ncameron.org>
This commit is contained in:
Nick Cameron
2025-03-08 04:04:57 +13:00
committed by GitHub
parent 5d25f4a0e5
commit 6cce3cda36
39 changed files with 163 additions and 470 deletions

View File

@ -85,8 +85,7 @@ const prepareToEditExtrude: PrepareToEditCallback =
codeManager.code.slice(
operation.labeledArgs?.['length']?.sourceRange[0],
operation.labeledArgs?.['length']?.sourceRange[1]
),
{}
)
)
if (err(distanceResult) || 'errors' in distanceResult) {
return baseCommand
@ -165,8 +164,7 @@ const prepareToEditOffsetPlane: PrepareToEditCallback = async ({
codeManager.code.slice(
operation.labeledArgs.offset.sourceRange[0],
operation.labeledArgs.offset.sourceRange[1]
),
{}
)
)
if (err(distanceResult) || 'errors' in distanceResult) {
@ -211,8 +209,7 @@ const prepareToEditHelix: PrepareToEditCallback = async ({ operation }) => {
codeManager.code.slice(
operation.labeledArgs.revolutions.sourceRange[0],
operation.labeledArgs.revolutions.sourceRange[1]
),
{}
)
)
if (err(revolutions) || 'errors' in revolutions) return baseCommand
@ -226,8 +223,7 @@ const prepareToEditHelix: PrepareToEditCallback = async ({ operation }) => {
codeManager.code.slice(
operation.labeledArgs.angleStart.sourceRange[0],
operation.labeledArgs.angleStart.sourceRange[1]
),
{}
)
)
if (err(angleStart) || 'errors' in angleStart) return baseCommand
@ -250,8 +246,7 @@ const prepareToEditHelix: PrepareToEditCallback = async ({ operation }) => {
codeManager.code.slice(
operation.labeledArgs.radius.sourceRange[0],
operation.labeledArgs.radius.sourceRange[1]
),
{}
)
)
if (err(radius) || 'errors' in radius) return baseCommand
@ -272,8 +267,7 @@ const prepareToEditHelix: PrepareToEditCallback = async ({ operation }) => {
codeManager.code.slice(
operation.labeledArgs.length.sourceRange[0],
operation.labeledArgs.length.sourceRange[1]
),
{}
)
)
if (err(length) || 'errors' in length) return baseCommand