ast: add new node AEscapeExpr to generalizes ABreakExpr and AContinueExpr

Signed-off-by: Jean Privat <jean@pryen.org>
console: use snake case.

Correct a little mistake.

Signed-off-by: Jean-Christophe Beaupré <jcbrinfo@users.noreply.github.com>
scope: create two escapemaks in loops

Signed-off-by: Jean Privat <jean@pryen.org>
astbuilder: can make loops and breaks

Signed-off-by: Jean Privat <jean@pryen.org>
transform: transforms `while` and `for`

Signed-off-by: Jean Privat <jean@pryen.org>
transform: shortcut range

Signed-off-by: Jean Privat <jean@pryen.org>
transform: move up shortcut-range from abstract_compiler to transform

Signed-off-by: Jean Privat <jean@pryen.org>
toolcontext: add --stub-man

Signed-off-by: Jean Privat <jean@pryen.org>
tests: update sav/test_toolcontext_args*.res

Signed-off-by: Jean Privat <jean@pryen.org>
share: generate stubs for manpages

Signed-off-by: Jean Privat <jean@pryen.org>
Merge: console: use snake case.

Correct a little mistake.

Signed-off-by: Jean-Christophe Beaupré <jcbrinfo@users.noreply.github.com>

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

In order to activate more optimizations and simplify code generators and analysis, the `while` and `for` loops must be transformed into simpler forms (in fact in complex forms but with simpler elements)

However, to do such a transformation, the escaping mechanism (break/continue/goto) must be rewrote.
Previously, for each loop control structure (loop for, while), a single EscapeMark was generated and breaks and continues are associated to the same mark, even if they branch in distinct points (so each escapemark had 2 branching mechanisms)
Now, with the first commits, two escapemarks are generated for each loop control structure, and breaks and continues are associated to a different one. The advantage is that each mark only have a single branching mechanism and that once associated to their mark, there is no need to distinguish break and continue (both become simple gotos).

The transformations of loops can be then implemented.

The `while`

~~~
while cond do block
~~~

is transformed into

~~~
loop if cond then block else break
~~~

and `for`

~~~
for i in col do block
~~~

is transformed into

~~~
var it = col.iterator
loop
   if it.is_ok then
      var i = it.item
      do block
      # ^ `continue` in the block it attached to the `do`
      # this is why the transformation of escape-marks where needed in fact.
      # and break is associated to the main loop
      it.next
   else
      break
   end
end
it.finish
~~~

Note that these transformations are basically what is currently implemented in rta, niti and nitg. Except that, now with a single transformation point, those three workers does not need to do their own transformation and basically can just rely on the one done on the AST level.

Pull-Request: #818
Reviewed-by: Lucas Bajolet <r4pass@hotmail.com>
Merge: Manpages

~~~sh
$ man nitg
~~~

A dream come true.

More seriously, toolcontext is extended to be able to generate manpages (in a similar way than completion).
Then a bunch of manpages is generated.

The content of the manpages should be improved but this is better than nothing.

Pull-Request: #825
Reviewed-by: Lucas Bajolet <r4pass@hotmail.com>