public void finishInitialization() {
mInitializingCount--;
}
private void evaluateModule(Module module) {
MagpieParser parser = new MagpieParser(module.readSource());
mLoadingModules.push(module);
try {
// Copy the base stuff in first.
if (module != mBaseModule) {
Scope scope = module.getScope();
for (String name : mBaseModule.getExportedNames()) {
scope.importName(name, name, mBaseModule, false);
}
}
// Evaluate the module.
try {
List<Expr> exprs = parser.parseModule();
for (Expr expr : exprs) {
evaluate(expr, module, module.getScope());
}
} catch (ParseException e) {
String message = String.format("Syntax error at %s: %s",