mirror of
https://github.com/litruv/picoGraph.git
synced 2026-07-24 02:36:04 +10:00
27 lines
743 B
JavaScript
27 lines
743 B
JavaScript
import { createNodeModule } from "../../nodeTypes.js";
|
|
|
|
/**
|
|
* Resumes execution after a stop.
|
|
*/
|
|
export const resumeNode = createNodeModule(
|
|
{
|
|
id: "system_resume",
|
|
title: "Resume",
|
|
category: "System",
|
|
description: "Resume the program after it has been stopped.",
|
|
searchTags: ["resume", "continue", "system", "run"],
|
|
inputs: [{ id: "exec_in", name: "Exec", direction: "input", kind: "exec" }],
|
|
outputs: [
|
|
{ id: "exec_out", name: "Exec", direction: "output", kind: "exec" },
|
|
],
|
|
properties: [],
|
|
},
|
|
{
|
|
emitExec: ({ indent, indentLevel, emitNextExec }) => {
|
|
const lines = [`${indent(indentLevel)}resume()`];
|
|
lines.push(...emitNextExec("exec_out"));
|
|
return lines;
|
|
},
|
|
}
|
|
);
|