tweak main function

This commit is contained in:
Timothy Warren 2019-10-24 17:07:07 -04:00
parent 26eb9170f7
commit 76b6acdf80

9
kilo
View File

@ -21,8 +21,8 @@ spl_autoload_register(static function ($class) {
} }
}); });
function main(int $argc, array $argv): int // ! Init with an IIFE
{ return (static function (int $argc, array $argv): int {
enable_raw_mode(); enable_raw_mode();
$editor = Editor::new(); $editor = Editor::new();
@ -46,7 +46,4 @@ function main(int $argc, array $argv): int
} }
return 0; return 0;
} })($argc, $argv);
//! Init
main($argc, $argv);