Update point-and-click sketch close code generation to use explicit lines (#2489)
* Modify sketch profile completion to use `profileStart` utilties * Fix up playwright tests * Rerun CI
This commit is contained in:
@ -1114,6 +1114,28 @@ export function addNewSketchLn({
|
||||
})
|
||||
}
|
||||
|
||||
export function addCallExpressionsToPipe({
|
||||
node,
|
||||
pathToNode,
|
||||
expressions,
|
||||
}: {
|
||||
node: Program
|
||||
programMemory: ProgramMemory
|
||||
pathToNode: PathToNode
|
||||
expressions: CallExpression[]
|
||||
}) {
|
||||
const _node = { ...node }
|
||||
const pipeExpression = getNodeFromPath<PipeExpression>(
|
||||
_node,
|
||||
pathToNode,
|
||||
'PipeExpression'
|
||||
).node
|
||||
if (pipeExpression.type !== 'PipeExpression')
|
||||
throw new Error('not a pipe expression')
|
||||
pipeExpression.body = [...pipeExpression.body, ...expressions]
|
||||
return _node
|
||||
}
|
||||
|
||||
export function addCloseToPipe({
|
||||
node,
|
||||
pathToNode,
|
||||
|
Reference in New Issue
Block a user