# Implementation of the method-related annotation `cached`
#
-# Note this module can be used as a reference on how to implements
-# complex annotation that modify both the model and the AST of a Nit program
+# The cached annotation is deprecated, use the `lazy` annotation instead.
module cached
import modelize
intrude import modelize::modelize_property
redef class ToolContext
+ # Process the `cached` annotation on methods
var cached_phase: Phase = new CachedPhase(self, [modelize_property_phase])
end
private class CachedPhase
super Phase
- init(toolcontext, depends)
+ init
do
# FIXME The phase has to be executed just after `modelize_property_phase`
# But there is no simple way to express this