refactor: remove sourcePath parameter from wrenInterpret and related module functions
The sourcePath field on ObjModule was redundant since it always matched the module name except for the main script. This change removes the parameter from wrenInterpret, wrenInterpretInModule, and wrenNewModule, and replaces all references to module->sourcePath with module->name in error reporting and debug output.
This commit is contained in:
+2
-2
@@ -206,7 +206,7 @@ void runFile(const char* path)
|
||||
|
||||
initVM();
|
||||
|
||||
WrenInterpretResult result = wrenInterpret(vm, path, source);
|
||||
WrenInterpretResult result = wrenInterpret(vm, source);
|
||||
|
||||
if (afterLoadFn != NULL) afterLoadFn(vm);
|
||||
|
||||
@@ -247,7 +247,7 @@ int runRepl()
|
||||
}
|
||||
|
||||
// TODO: Handle failure.
|
||||
wrenInterpret(vm, "Prompt", line);
|
||||
wrenInterpret(vm, line);
|
||||
|
||||
// TODO: Automatically print the result of expressions.
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user