Move meta and random to "aux" modules.
Wren now has three classes of modules: - The one magic "core" module that's built in and always needed. - Auxiliary libraries like "meta" and "random". These do not have any dependencies, so can be used even when you embed Wren inside an application. But they're also optional and can be disabled if you don't need them. - CLI modules. These ones need libuv and are tied to the CLI wrapper around the VM.
This commit is contained in:
@@ -1,13 +0,0 @@
|
||||
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)
|
||||
}
|
||||
Reference in New Issue
Block a user