compile
core-api
cfunction
src/core/compile.c on line 1308, column 1
(compile ast &opt env source lints)
Compiles an abstract syntax tree `ast` into a function. Returns a
new function and does not modify `ast`. If compilation fails,
returns an error struct with keys `:line`, `:column`, and `:error`.
If a table `env` is given, specifies the environment of the fiber
used during compilation. Optional argument `source` is a string or
keyword that is a source path for better errors. If a `lints` array
is given, linting messages will be appended to the array. Each
message will be a tuple of the form `[level line col message]`.