evaluatePhraseThen

fun evaluatePhraseThen(expressionNode: A_Phrase, lexingState: LexingState, fiberSetup: A_Fiber.() -> Unit, shouldSerialize: Boolean, trackTasks: Boolean, onSuccess: (AvailObject) -> Unit, onFailure: (Throwable) -> Unit)

Generate a function from the specified phrase and evaluate it in the module's context; lexically enclosing variables are not considered in scope, but module variables and constants are in scope.

Parameters

expressionNode
lexingState

The position at which the expression starts.

fiberSetup

A function to update the fiber prior to launching it.

shouldSerialize

true if the generated function should be serialized, false otherwise.

trackTasks

Whether to track that this fiber is running, and when done, to run noMoreWorkUnits if the queued/completed counts agree.

onSuccess

What to do with the result of the evaluation.

onFailure

What to do after a failure.