Merge: More keep going
authorJean Privat <jean@pryen.org>
Mon, 8 Jun 2015 10:05:14 +0000 (06:05 -0400)
committerJean Privat <jean@pryen.org>
Mon, 8 Jun 2015 10:05:14 +0000 (06:05 -0400)
commitd0279f4e1414d9a12b2d5320115dbc95b1fb88f0
tree71bd921e1720439f65691470ceb335586bc986d3
parent8a1e5b72b98280425bdfaa0c4eb64d8b52411502
parent79038d7bce17eb36c05617730c72850d4749be4e
Merge: More keep going

This improve the robustness of tools when given --keep-going.
Tools like nitpick, that have --keep-going by default, are more robust and collect more errors.

Moreover, the compiler can now compile simple programs with instructions that fail during the typing phase (most errors like unknown method or bad type).

These instructions are compiled with a run time error instead so the program is still expected to behave in an reliable way.

~~~nit
print 1
fail now
print 2
~~~

~~~sh
$ nitc kg.nit --keep-going
kg.nit:2,1--4: Error: method or variable `fail` unknown in `Sys`.
$ ./kg
1
Runtime error: FATAL: bad statement executed. (kg.nit:1)
~~~

One usage would be to force `c_src` to compile things even if it lags behind.

Pull-Request: #1440
Reviewed-by: Lucas Bajolet <r4pass@hotmail.com>
Reviewed-by: Alexis Laferrière <alexis.laf@xymus.net>
Reviewed-by: Romain Chanoir <chanoir.romain@courrier.uqam.ca>
src/compiler/abstract_compiler.nit
src/compiler/separate_compiler.nit
src/rapid_type_analysis.nit
src/semantize/typing.nit