Rename REAMDE to README.md
[nit.git] / src / phase.nit
index 1a10cf2..5f0faf1 100644 (file)
@@ -110,7 +110,6 @@ redef class ToolContext
 
                        for phase in phases do
                                if phase.disabled then continue
-                               self.info(" phase: {phase}", 3)
                                assert phase.toolcontext == self
                                var errcount = self.error_count
                                phase.process_nmodule(nmodule)
@@ -132,7 +131,10 @@ redef class ToolContext
                                        break
                                end
                                for na in vannot.annotations do
-                                       phase.process_annotated_node(na.parent.parent.as(not null), na)
+                                       var p = na.parent
+                                       if p isa AAnnotations then p = p.parent
+                                       assert p != null
+                                       phase.process_annotated_node(p, na)
                                end
                                if errcount != self.error_count then
                                        self.check_errors
@@ -145,7 +147,7 @@ redef class ToolContext
                var time1 = get_time
                self.info("*** END SEMANTIC ANALYSIS: {time1-time0} ***", 2)
 
-               errors_info
+               self.check_errors
        end
 
        # Process the given `phase` on the `npropdef`
@@ -220,7 +222,7 @@ abstract class Phase
        end
 
        # By default, the name is the lowercased prefix of the classname
-       redef fun to_s do return class_name.strip_extension("Phase").to_lower
+       redef fun to_s do return class_name.strip_extension("Phase").to_snake_case
 
        # Is the phase globally disabled?
        # A disabled phase is not called automatically called by `ToolContext::run_phases` and cie.