Package-level declarations

Types

Link copied to clipboard
class Coroutine(state: State, chunk: Chunk.Instance, args: List<Value>) : Value

An instance of a coroutine.

Link copied to clipboard

A loader that loads from the filesystem

Link copied to clipboard
object Intrinsics

An object which contains all the global intrinsic functions.

Link copied to clipboard

The math library

Link copied to clipboard
fun interface ModuleLoader

A class that loads a module.

Link copied to clipboard
abstract class NativeLibrary(val name: String) : OneShotFunction

A native library that can be loaded into a State and imported with require

Link copied to clipboard

A loader that loads NativeLibrarys

Link copied to clipboard

Contains the metatables of various native objects.

Link copied to clipboard
abstract class OneShotFunction(val arity: Arity) : CallableValue

A function that is guaranteed to finish in one step. Optimization for this is implemented.

Link copied to clipboard

The os library

Link copied to clipboard

The paths library's native functions

Link copied to clipboard

The random library

Link copied to clipboard

The regex library

Link copied to clipboard

A loader that loads from the Metis JAR's resources

Functions

Link copied to clipboard
inline fun fourArgFunction(requiresSelf: Boolean = false, crossinline fn: State.(Value, Value, Value, Value) -> Value): OneShotFunction

Creates a OneShotFunction with four arguments.

Link copied to clipboard
inline fun oneArgFunction(requiresSelf: Boolean = false, crossinline fn: State.(Value) -> Value): OneShotFunction

Creates a OneShotFunction with one argument.

Link copied to clipboard
inline fun threeArgFunction(requiresSelf: Boolean = false, crossinline fn: State.(Value, Value, Value) -> Value): OneShotFunction

Creates a OneShotFunction with three arguments.

Link copied to clipboard
inline fun <T> translateIoError(block: () -> T): T

Translates an IOException into a MetisRuntimeException.

Link copied to clipboard
inline fun twoArgFunction(requiresSelf: Boolean = false, crossinline fn: State.(Value, Value) -> Value): OneShotFunction

Creates a OneShotFunction with two arguments.

Link copied to clipboard
inline fun zeroArgFunction(crossinline fn: State.() -> Value): OneShotFunction

Creates a OneShotFunction with zero arguments.