nitvm: Allow to set some attributes in Variable class
authorJulien Pagès <julien.projet@gmail.com>
Sun, 31 May 2015 17:45:29 +0000 (19:45 +0200)
committerJulien Pagès <julien.projet@gmail.com>
Sun, 31 May 2015 17:45:29 +0000 (19:45 +0200)
Signed-off-by: Julien Pagès <julien.projet@gmail.com>

src/semantize/scope.nit
src/semantize/typing.nit

index 4ea5f27..34fa640 100644 (file)
@@ -33,13 +33,13 @@ end
 # A local variable (including parameters, automatic variables and self)
 class Variable
        # The name of the variable (as used in the program)
-       var name: String
+       var name: String is writable
 
        # Alias of `name`
        redef fun to_s do return self.name
 
        # The declaration of the variable, if any
-       var location: nullable Location = null
+       var location: nullable Location = null is writable
 
        # Is the local variable not read and need a warning?
        var warn_unread = false is writable
@@ -431,7 +431,7 @@ end
 
 redef class AVarFormExpr
        # The associated variable
-       var variable: nullable Variable
+       var variable: nullable Variable is writable
 end
 
 redef class ACallFormExpr
index c26ca0f..8a4e13f 100644 (file)
@@ -646,7 +646,7 @@ end
 
 redef class Variable
        # The declared type of the variable
-       var declared_type: nullable MType
+       var declared_type: nullable MType is writable
 
        # Was the variable type-adapted?
        # This is used to speedup type retrieval while it remains `false`