Initial commit

This commit is contained in:
2024-10-01 18:46:03 +02:00
commit e2868cd7bf
16 changed files with 1036 additions and 0 deletions

24
src/entry.php Normal file
View File

@@ -0,0 +1,24 @@
<?php
require_once __DIR__."/../vendor/autoload.php";
$filename = $argv[1]??null; // ?(__DIR__."/../composer.json");
$terminal = new NoccyLabs\JEdit\Terminal\Terminal();
$editor = new NoccyLabs\JEdit\Editor\Editor($terminal);
if ($filename) {
$editor->loadFile($filename);
} else {
$editor->loadDocument((object)[]);
}
set_exception_handler(function (\Throwable $t) use ($terminal) {
register_shutdown_function(function () use ($t, $terminal) {
$terminal->shutdown();
echo $t."\n";
});
});
$editor->run();