BuiltinFunction (exlisp v0.1.2)

Copy Markdown

Module responsible for determining ExLisp built-in functions and compiling them to Erlang Abstract Format.

Summary

Functions

Returns a boolean indicating whether the given operator is a built-in function.

Returns the list of defined built-in function atoms.

Returns the canonicalized atom name for the given operator.

Compiles a built-in function call to Erlang Abstract Format. Receives compile_expr_fn callback to compile argument expressions.

Determines whether the given operator is a built-in function. Returns {:ok, atom_name} if it is a built-in function, :error otherwise.

Functions

builtin?(op)

Returns a boolean indicating whether the given operator is a built-in function.

builtins()

Returns the list of defined built-in function atoms.

canonical_name(name)

Returns the canonicalized atom name for the given operator.

compile(op, args, compile_expr_fn)

Compiles a built-in function call to Erlang Abstract Format. Receives compile_expr_fn callback to compile argument expressions.

lookup(name)

Determines whether the given operator is a built-in function. Returns {:ok, atom_name} if it is a built-in function, :error otherwise.