Move Meta to a separate module.

Also cleaned up some of the code around loading the core module.
This commit is contained in:
Bob Nystrom
2015-10-15 18:08:56 -07:00
parent 06a4e00f31
commit d5b9f0096c
11 changed files with 119 additions and 99 deletions

View File

@ -1 +1,13 @@
class Meta {}
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)
}