struct Myst::Invocation

Overview

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.

Defined in:

myst/interpreter/invocation.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(itr : Interpreter, func : TFunctor, receiver : Value | Nil, args : Array(Value), block : TFunctor | Nil) #

[View source]

Instance Method Detail

def args : Array(Value) #

[View source]
def args=(args : Array(Value)) #

[View source]
def block : TFunctor | Nil #

def block=(block : TFunctor | Nil) #

[View source]
def block? : TFunctor | Nil | Nil #

def func : TFunctor #

[View source]
def func=(func : TFunctor) #

[View source]
def invoke #

[View source]
def itr : Interpreter #

[View source]
def itr=(itr : Interpreter) #

[View source]
def receiver : Value | Nil #

def receiver=(receiver : Value | Nil) #

[View source]
def receiver? : Value | Nil | Nil #