Merge: Toward the kill of oldstyle attributes
authorJean Privat <jean@pryen.org>
Thu, 17 Jul 2014 19:28:39 +0000 (15:28 -0400)
committerJean Privat <jean@pryen.org>
Thu, 17 Jul 2014 19:28:39 +0000 (15:28 -0400)
The transition from old-style to new-style attributes is a mess (cf. #280)
So in order to facilitate the transition, this patch enable the access to the internal attribute previously hidden by then new_style attribute.

Therefore, the transition path is simpler since one can move declaration from old-style to new-style but some access can still use the old `_foo` notation.

Note, the `_foo` access is not mean to be publicized bu only made available for specific short-term workarounds and transitions.

Practically, internal attribute named are prefixed with `_` and made visible (but private)

~~~
class A
   var foo: Int # introduce `foo`, `foo=` and, now, `_foo`
   fun bar do print _foo # Valid, it is a direct access to the real attribute behind the service `foo`
end
~~~

Note: because of bootstrap issues (in lib and parser), the remaining old-style attribute declarations remain and will be nuked in a future point after the regeneration of c_src

Pull-Request: #585
Reviewed-by: Lucas Bajolet <r4pass@hotmail.com>
Reviewed-by: Alexandre Terrasa <alexandre@moz-code.org>


No differences found