grammar: accept annonymous label
authorJean Privat <jean@pryen.org>
Wed, 18 Jun 2014 01:51:35 +0000 (21:51 -0400)
committerJean Privat <jean@pryen.org>
Wed, 16 Jul 2014 20:56:48 +0000 (16:56 -0400)
commita2ad6a262aa94065a9fff4355e11cba391d11bdb
tree33867374d0e7efb3f519e65e98012aa696388cdf
parent8c8a26132db8c94fc51faeee8864bad4e7c6b39a
grammar: accept annonymous label

Often, a single label is needed, for aborting some neested loops for
instance. But the programmer was forced to still gives a name to a
label. This yielded to crasy or useless names,

The proposal is to allow anonymous label.

Eg. in the following, the break breaks the x loop
~~~
for x in xs do
  for y in ys do
    stuff
    if something then break label
  end
  stuff
end label
~~~

Note: by the way, valued breaks and continues are removed.

Signed-off-by: Jean Privat <jean@pryen.org>
src/parser/nit.sablecc3xx
src/parser/parser_nodes.nit