struct

Myst::Invocation

Inherits Struct / Value / Object

An Invocation is a binding of the interpreter, a function, and arguments for the function together to represent a Call.

In essence, an Invocation is the step between the Call node in the AST and the result of calling a function. Functor resolution happens before creating an Invocation, meaning they can be passed around without concern for lexical scoping or the like. However, the entire functor is carried with an Invocation; matching to a specific definition does not happen until the Invocation is invoked.

Constructors

new(itr : Interpreter, func : TFunctor, receiver : MTValue | Nil, args : Array(MTValue), block : TFunctor | Nil)
Source

Instance methods

args
Source
args=(args : Array(MTValue))
Source
block
Source
block=(block : TFunctor | Nil)
Source
block?
Source
func
Source
func=(func : TFunctor)
Source
invoke
Source
itr=(itr : Interpreter)
Source
receiver
Source
receiver=(receiver : MTValue | Nil)
Source
receiver?
Source