Skip to content

Exit expression

Latest
Compare
Choose a tag to compare
@siriuslatte siriuslatte released this 21 Mar 02:20
· 14 commits to main since this release
6566efd

Added an exit expression, used to close the current running Scribe's thread. You can listen for this change of your Scribe program's state within the onExit callback.

import { Scribe } from "@aethergames/scribe";

const ScribeRuntime = Scribe.load(
    `
    exit "Hello, world!"
`,
    {/** Your environment */},
);

ScribeRuntime.onExit = ({ output }) => print(output); // Hello, world!

ScribeRuntime.start();

What's Changed

  • feat(parser) & meta(versioning): added exit as an expression by @siriuslatte in #11

Full Changelog: v0.3.1-beta.1...v0.3.2-beta.1