1.1 --- a/src/main.cpp Sat Dec 22 18:25:31 2012 -0800
1.2 +++ b/src/main.cpp Sat Dec 22 19:48:43 2012 -0800
1.3 @@ -45,7 +45,7 @@
1.4 }
1.5 }
1.6 virtual void beginCompilationErrors(const char *file) {
1.7 - fprintf(stderr, "\nDisplaying compilation errors for \"%s\"\n", file);
1.8 + fprintf(stderr, "Displaying compilation errors for \"%s\"\n", file);
1.9 }
1.10 virtual void reportCompilationError(const char *message, unsigned line, unsigned col) {
1.11 fprintf(stderr, " line %d, col %d: %s\n", line, col, message);
1.12 @@ -110,12 +110,15 @@
1.13 int rval = 0;
1.14
1.15 Keima::InstallMessageReporter(&s_Reporter);
1.16 - {
1.17 + do {
1.18 MainCollector entry;
1.19 Keima::SetPublicFunctionListener(&entry);
1.20
1.21 HandleScope scope;
1.22 - Compile(argv[1]);
1.23 + if (!Compile(argv[1])) {
1.24 + rval = 1;
1.25 + break;
1.26 + }
1.27
1.28 Keima::CollectGarbage();
1.29
1.30 @@ -131,7 +134,7 @@
1.31 if (!Keima::Invoke(fun, NULL, 0, true, &rval))
1.32 rval = 1;
1.33 }
1.34 - }
1.35 + } while (0);
1.36
1.37 Keima::Shutdown();
1.38