diff dang/compiler.d @ 92:771ac63898e2 new_gen

A few better parser errors plus renaming most of the sema classes to match that they do now. Some have changes a lot.
author Anders Johnsen <skabet@gmail.com>
date Mon, 05 May 2008 18:44:20 +0200
parents 1a24e61eb104
children 48bb2287c035
line wrap: on
line diff
--- a/dang/compiler.d	Mon May 05 17:07:16 2008 +0200
+++ b/dang/compiler.d	Mon May 05 18:44:20 2008 +0200
@@ -24,9 +24,9 @@
 
 import sema.Visitor,
        sema.AstAction,
-       sema.SymbolTableBuilder,
-       sema.ImplicitCast,
-       sema.Declarations;
+       sema.ScopeBuilder,
+       sema.ScopeCheck,
+       sema.TypeCheck;
 
 import Opt = dang.OptParse;
 
@@ -190,19 +190,19 @@
         auto action = new AstAction(src_mgr);
         auto decls = cast(Decl[])parser.parse(src_mgr, lexer, action);
         timings ~= Measurement("Lex + Parse", watch.stop);
-        messages.checkErrors();
+        messages.checkErrors(ExitLevel.Parser);
 
         StopWatch watch2;
         watch.start;
         watch2.start;
-        (new SymbolTableBuilder).visit(decls);
-        auto symbol_table = watch2.stop;
+        (new ScopeBuilder).visit(decls);
+        auto scope_builder = watch2.stop;
         watch2.start;
-        (new Declarations).visit(decls);
-        auto declarations = watch2.stop;
+        (new ScopeCheck).visit(decls);
+        auto scope_check = watch2.stop;
         watch2.start;
-        (new ImplicitCast).visit(decls);
-        auto implicit_casts = watch2.stop;
+        (new TypeCheck).visit(decls);
+        auto type_check = watch2.stop;
         watch2.start;
 
         foreach (decl; decls)
@@ -210,9 +210,9 @@
         auto simplify = watch2.stop;
         auto extra_stuff = watch.stop;
         timings ~= Measurement("Extra stuff", watch.stop);
-        timings ~= Measurement("  - Building scopes", symbol_table);
-        timings ~= Measurement("  - Extracting declarations", declarations);
-        timings ~= Measurement("  - Making casts explicit", implicit_casts);
+        timings ~= Measurement("  - Building scopes", scope_builder);
+        timings ~= Measurement("  - Checking scopes", scope_check);
+        timings ~= Measurement("  - Checking types", type_check);
 
         postParse(decls, src_mgr);
     }