From: Julien Pagès Date: Sun, 31 May 2015 17:45:29 +0000 (+0200) Subject: nitvm: Allow to set some attributes in Variable class X-Git-Tag: v0.7.6~55^2~8 X-Git-Url: http://nitlanguage.org nitvm: Allow to set some attributes in Variable class Signed-off-by: Julien Pagès --- diff --git a/src/semantize/scope.nit b/src/semantize/scope.nit index 4ea5f27..34fa640 100644 --- a/src/semantize/scope.nit +++ b/src/semantize/scope.nit @@ -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 diff --git a/src/semantize/typing.nit b/src/semantize/typing.nit index c26ca0f..8a4e13f 100644 --- a/src/semantize/typing.nit +++ b/src/semantize/typing.nit @@ -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`