Merge: Generalized class members
authorJean Privat <jean@pryen.org>
Thu, 26 Feb 2015 02:23:18 +0000 (09:23 +0700)
committerJean Privat <jean@pryen.org>
Thu, 26 Feb 2015 02:23:18 +0000 (09:23 +0700)
commit8c2a37f4cf7cdc4a1f4ae2154180dec02d9f3bb6
tree40c990b0bb9c17015c7e92b4186b5b50e987c7b3
parent8dd99e08efcbb1efd945ed33148dc1bb3b2c522d
parentf94f207732825e4976c5de417ff48ccfb2d96ba0
Merge: Generalized class members

This PR change the way class members are parsed.

Before, the order was strict: class annotations, then extern code block, then super clauses, then properties.
After, annotations and super clauses can appear in any order within the properties

The need is to enable class annotations inside the class (cf #1158) I did not find another simple way to do this.

Now, one can write
~~~nit
class B
   super A
   serializable
   var i: Int
   autoinit x, i
end
~~~

Pull-Request: #1159
Reviewed-by: Lucas Bajolet <r4pass@hotmail.com>
Reviewed-by: Alexandre Terrasa <alexandre@moz-code.org>
Reviewed-by: Alexis Laferrière <alexis.laf@xymus.net>
src/modelize/modelize_property.nit
src/parser/parser_nodes.nit
tests/sav/test_parser_args1.res