nitlanguage
/
nit.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0f325d8
)
lib/kernel: introduce `Sys::run` as the entry point of programs
author
Jean Privat
<jean@pryen.org>
Wed, 6 Aug 2014 20:14:47 +0000
(16:14 -0400)
committer
Jean Privat
<jean@pryen.org>
Wed, 6 Aug 2014 20:14:47 +0000
(16:14 -0400)
Signed-off-by: Jean Privat <jean@pryen.org>
lib/standard/kernel.nit
patch
|
blob
|
history
diff --git
a/lib/standard/kernel.nit
b/lib/standard/kernel.nit
index
dcd48b5
..
3fc5066
100644
(file)
--- a/
lib/standard/kernel.nit
+++ b/
lib/standard/kernel.nit
@@
-83,6
+83,11
@@
class Sys
# Instructions outside classes implicitly redefine this method.
fun main do end
+ # The entry point for the execution of the whole program.
+ # Its job is to call `main` but some modules may want to refine it
+ # and inject specific work before or after the main part.
+ fun run do main
+
# Number of the last error
fun errno: Int is extern `{
return errno;