Merge: New `deprecated` annotation
authorJean Privat <jean@pryen.org>
Mon, 8 Sep 2014 13:33:25 +0000 (09:33 -0400)
committerJean Privat <jean@pryen.org>
Mon, 8 Sep 2014 13:33:25 +0000 (09:33 -0400)
commit07aecab9057a6fe7a45ecd824e8401be59734a51
tree0e920391a3a01b78af2655d3c9ca014e285a9639
parente9b8d0fc9e4fe8956a07954f588bb6762b4bea66
parented9a44cbabebeedb39dd8847fc1eb2a3ef5bdb0a
Merge: New `deprecated` annotation

The `deprecated` annotation is used on methods to produce warnings when called in a non-deprecated method.

Instead of a simple Boolean flag, deprecation is a rich model information structure that can contains some documentation, and later be extended (eg. version information, suggested substitution, etc.).

Example:
~~~
class A
   # standard documentation
   fun foo is
      # doc for the deprecation
      deprecated
   do
     stuff
   end
end
~~~

Migration of the existing code to use `deprecated`will done in a future PR, once #719 is merged to avoid conflicts.

nitdoc need also to be extended and presents deprecation information. (see #640)
Since the deprecation documentation is autonomous, it could be displayed specifically (eg. in a colored box)

Pull-Request: #723
Reviewed-by: Alexandre Terrasa <alexandre@moz-code.org>
src/model/mdoc.nit
src/modelize/modelize_property.nit