class

Cosmo::Intrinsic::IFunction

Inherits Cosmo::Callable / Reference / Object

An intrinsic function

Constructors

new(interpreter : Interpreter)
Source

Instance methods

call(args : Array(ValueType)) : ValueType

Executes the function body, passing in args

Source
intrinsic?

Whether or not this function is intrinsic

Source
to_s

Returns a nicely readable and concise string representation of this object, typically intended for users.

This method should usually not be overridden. It delegates to #to_s(IO) which can be overridden for custom implementations.

Also see #inspect.

Source
token(name : String) : Token

Helper function to generate a fake token for logging

Source