modelize: make `mclassdef2nclassdef` and `mpropdef2npropdef` private
authorJean Privat <jean@pryen.org>
Thu, 4 Dec 2014 20:00:26 +0000 (15:00 -0500)
committerJean Privat <jean@pryen.org>
Thu, 4 Dec 2014 20:00:26 +0000 (15:00 -0500)
Signed-off-by: Jean Privat <jean@pryen.org>

src/modelize/modelize_class.nit
src/modelize/modelize_property.nit

index 79cab6e..ae9da02 100644 (file)
@@ -411,9 +411,8 @@ redef class ModelBuilder
                end
        end
 
-       # Register the nclassdef associated to each mclassdef
-       # FIXME: why not refine the `MClassDef` class with a nullable attribute?
-       var mclassdef2nclassdef = new HashMap[MClassDef, AClassdef]
+       # Registration of the nclassdef associated to each mclassdef
+       private var mclassdef2nclassdef = new HashMap[MClassDef, AClassdef]
 
        # Return the static type associated to the node `ntype`.
        # `mmodule` and `mclassdef` is the context where the call is made (used to understand formal types)
index ee66019..7cac30e 100644 (file)
@@ -17,7 +17,7 @@
 # Analysis and verification of property definitions to instantiate model element
 module modelize_property
 
-import modelize_class
+intrude import modelize_class
 private import annotation
 
 redef class ToolContext
@@ -36,9 +36,10 @@ private class ModelizePropertyPhase
 end
 
 redef class ModelBuilder
-       # Register the npropdef associated to each mpropdef
-       # FIXME: why not refine the `MPropDef` class with a nullable attribute?
-       var mpropdef2npropdef = new HashMap[MPropDef, APropdef]
+       # Registration of the npropdef associated to each mpropdef.
+       #
+       # Public clients need to use `mpropdef2node` to access stuff.
+       private var mpropdef2npropdef = new HashMap[MPropDef, APropdef]
 
        # Retrieve the associated AST node of a mpropertydef.
        # This method is used to associate model entity with syntactic entities.