From 5c3428d76d249afcb45ebc2d43a88b364a10ce3f Mon Sep 17 00:00:00 2001 From: =?utf8?q?Julien=20Pag=C3=A8s?= Date: Sun, 31 May 2015 19:45:29 +0200 Subject: [PATCH] nitvm: Allow to set some attributes in Variable class MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Julien Pagès --- src/semantize/scope.nit | 6 +++--- src/semantize/typing.nit | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) 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` -- 1.7.9.5