sonic-weave
    Preparing search index...

    Function evaluateExpression

    • Evaluate a SonicWeave program and return the value of the final expression.

      Parameters

      • source: string

        Source code for a SonicWeave program.

      • includePrelude: boolean = true

        Whether or not to include the extended standard library. Passing in false results in a faster start-up time.

      • OptionalextraBuiltins: Record<string, SonicWeaveValue>

        Custom builtins callable inside the SonicWeave program.

      Returns SonicWeaveValue

      Value of the final expression in the program.

      An error if the final statement in the program is not an expression, if a control-flow interrupt escapes, or if deferred actions are present.