Files
wren/builtin/meta.wren
T

14 lines
312 B
Plaintext
Raw Normal View History

2015-10-15 18:08:56 -07:00
class Meta {
static eval(source) {
if (!(source is String)) Fiber.abort("Source code must be a string.")
var fn = compile_(source)
// TODO: Include compile errors.
if (fn == null) Fiber.abort("Could not compile source code.")
Fiber.new(fn).call()
}
foreign static compile_(source)
}