php-kilo/kilo

27 lines
362 B
Plaintext
Raw Normal View History

2019-10-10 12:28:46 -04:00
#!/usr/bin/php
<?php declare(strict_types=1);
namespace Kilo;
require_once __DIR__ . '/src/constants.php';
require_once __DIR__ . '/src/functions.php';
2019-10-11 16:32:47 -04:00
require_once __DIR__ . '/src/editor.php';
2019-10-10 12:28:46 -04:00
function main(): int
{
enableRawMode();
2019-10-11 16:32:47 -04:00
$editor = new Editor();
2019-10-10 12:28:46 -04:00
// Input Loop
2019-10-10 15:49:01 -04:00
while (true)
2019-10-10 12:28:46 -04:00
{
2019-10-11 16:32:47 -04:00
$editor->processKeypress();
2019-10-10 12:28:46 -04:00
}
return 0;
}
//! Init
main();