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:
@ -254,7 +254,7 @@ const newVar = myVar + 1`
|
||||
],
|
||||
})
|
||||
expect(mem['yo']).toEqual({
|
||||
type: 'Array',
|
||||
type: 'MixedArray',
|
||||
value: [
|
||||
{
|
||||
type: 'Number',
|
||||
@ -520,9 +520,9 @@ const theExtrude = startSketchOn('XY')
|
||||
|
||||
// helpers
|
||||
|
||||
async function exe(code: string, variables: VariableMap = {}) {
|
||||
async function exe(code: string) {
|
||||
const ast = assertParse(code)
|
||||
|
||||
const execState = await enginelessExecutor(ast, true, undefined, variables)
|
||||
const execState = await enginelessExecutor(ast, true, undefined)
|
||||
return execState.variables
|
||||
}
|
||||
|
Reference in New Issue
Block a user