Merge: lib/github: implements caching to maximize rate limit.
[nit.git] / src / frontend / check_annotation.nit
index 6249e91..fa909bc 100644 (file)
@@ -22,6 +22,7 @@ import phase
 private import annotation
 
 redef class ToolContext
+       # Check for unknown annotation in each module
        var check_annotation_phase: Phase = new CheckAnnotationPhase(self, null)
 end
 
@@ -60,7 +61,7 @@ private class CheckAnnotationPhase
 
                        for m in super_mmodules do
                                if declared_annotations[m].has(name) then
-                                       modelbuilder.warning(annot, "Warning: an annotation `{name}` is already declared in module `{m}`")
+                                       modelbuilder.warning(annot, "multiple-annotation-declarations", "Warning: an annotation `{name}` is already declared in module `{m}`")
                                        break label
                                end
                        end
@@ -81,9 +82,14 @@ lazy
 noinit
 readonly
 writable
+autoinit
 cached
 nosuper
 old_style_init
+abstract
+intern
+extern
+no_warning
 
 pkgconfig
 c_compiler_option
@@ -117,7 +123,7 @@ platform
 
                if annots.has(name) then return
 
-               toolcontext.modelbuilder.warning(nat, "Warning: unknown annotation `{name}`")
+               toolcontext.modelbuilder.warning(nat, "unknown-annotation", "Warning: unknown annotation `{name}`")
 
                annots.add(name) # to avoid multiple errors on the same name
        end