#!/usr/bin/env php
<?php
/**
 * This file is part of Schema.
 *
 * (c) Axel Etcheverry <axel@etcheverry.biz>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

require __DIR__ . '/../vendor/autoload.php';

use Schema\Compiler;

error_reporting(E_ALL);
ini_set('display_errors', 1);

try {
    $compiler = new Compiler();
    $compiler->compile();
} catch (\Exception $e) {
    echo sprintf(
        'Failed to compile phar: [%s] %s at %s:%d',
         get_class($e),
         $e->getMessage(),
         $e->getFile(),
         $e->getLine()
    ) . PHP_EOL;
    exit(1);
}