module Myst::NativeLib

Extended Modules

Defined in:

myst/interpreter/native_lib.cr

Macro Summary

Instance Method Summary

Macro Detail

macro def_instance_method(type, name, impl_name) #

[View source]
macro def_method(type, name, impl_name) #

[View source]
macro method(name, this_type, *params, &block) #

[View source]

Instance Method Detail

def call_func(itr, func : TFunctor, args : Array(Value), receiver : Value | Nil = nil) #

Mimic the functionality of a Call, but without the lookup of the function. The function can be either a native function or a source-level function. The results do not affect the stack, the result of calling the function will be returned directly.


[View source]
def call_func_by_name(itr, receiver : Value, name : String, args : Array(Value)) #

Same as #call_func, but the function to call is given as a name to look up on the given receiver.


[View source]
def error(message : String, trace : Callstack) #

Return a RuntimeError with the given string as the value.


[View source]
def instantiate(itr, type : TType, params : Array(Value)) : TInstance #

Instantiate a given type and invoke its initializer


[View source]