Get logical imports in "wren_modules" working.

There's a lot of changes here and surely some rough edges to iron out.
Also, I need to update the docs. But I want to get closer to landing
this so I can build on it.
This commit is contained in:
Bob Nystrom
2018-07-15 20:09:41 -07:00
parent 8210452970
commit c367fc3bfc
31 changed files with 665 additions and 190 deletions

View File

@ -4,23 +4,23 @@
static void beforeDefined(WrenVM* vm)
{
wrenGetVariable(vm, "test/api/get_variable", "A", 0);
wrenGetVariable(vm, "./test/api/get_variable", "A", 0);
}
static void afterDefined(WrenVM* vm)
{
wrenGetVariable(vm, "test/api/get_variable", "A", 0);
wrenGetVariable(vm, "./test/api/get_variable", "A", 0);
}
static void afterAssigned(WrenVM* vm)
{
wrenGetVariable(vm, "test/api/get_variable", "A", 0);
wrenGetVariable(vm, "./test/api/get_variable", "A", 0);
}
static void otherSlot(WrenVM* vm)
{
wrenEnsureSlots(vm, 3);
wrenGetVariable(vm, "test/api/get_variable", "B", 2);
wrenGetVariable(vm, "./test/api/get_variable", "B", 2);
// Move it into return position.
const char* string = wrenGetSlotString(vm, 2);
@ -29,7 +29,7 @@ static void otherSlot(WrenVM* vm)
static void otherModule(WrenVM* vm)
{
wrenGetVariable(vm, "test/api/get_variable_module", "Variable", 0);
wrenGetVariable(vm, "./test/api/get_variable_module", "Variable", 0);
}
WrenForeignMethodFn getVariableBindMethod(const char* signature)