When a program starts, the following implicit sequence of instructions is executed
sys = new Sys
sys.run
Whereas the job of the run
method is just to execute main
.
The only reason of the existence of run
is to allow modules to refine it
and inject specific work before or after the main part.
# The entry point for the execution of the whole program.
#
# When a program starts, the following implicit sequence of instructions is executed
#
# ~~~nitish
# sys = new Sys
# sys.run
# ~~~
#
# Whereas the job of the `run` method is just to execute `main`.
#
# The only reason of the existence of `run` is to allow modules to refine it
# and inject specific work before or after the main part.
fun run do main
lib/core/kernel.nit:283,2--296,16
redef fun run do
"".to_cstring.set_locale
super
end
lib/gettext/gettext.nit:26,2--29,4
redef fun run do
super
if auto_hash_display then show_hash_stats
end
lib/hash_debug/hash_debug.nit:124,2--127,4
redef fun run do
if not args.is_empty then
open_next_stream
end
loop
read_next_line
main
end
end
lib/niti_runtime/niti_runtime.nit:17,2--25,4
redef fun run do
super
print_stats
end
lib/array_debug/array_debug.nit:59,2--62,4