将网址常量作为Translator一部分

pull/42/head
NathanFreeman 4 weeks ago
parent 854390329a
commit 37b24a12d2
  1. 2
      bin/bootstrap.php
  2. 2
      bin/tpc.php
  3. 1
      src/Translator.php

@ -1,8 +1,6 @@
<?php
define("ROOT_PATH", dirname(__DIR__));
const DEBUG = true;
const VERSION = '0.4.1';
const WEBSITE = 'https://www.swoole.com/aot/';
require ROOT_PATH . '/vendor/autoload.php';
require ROOT_PATH . '/src/functions.php';

@ -5,7 +5,7 @@ require __DIR__ . '/../src/polyfills.php';
require __DIR__ . '/../src/gen_stub.php';
require __DIR__ . '/../src/compiler.php';
echo sprintf(file_get_contents(ROOT_PATH . "/TypePHP.txt"), VERSION, WEBSITE) . PHP_EOL;
echo sprintf(file_get_contents(ROOT_PATH."/TypePHP.txt"), \TypePhp\Translator::VERSION, \TypePhp\Translator::WEBSITE).PHP_EOL;
const TYPEPHP_PHP_SCRIPT_ENTRY = true;
main($argc, $argv);

@ -60,6 +60,7 @@ class Translator extends Preprocessor
public const string VERSION = '0.4.3';
public const string APP_NAME = 'TypePHP Compiler (AOT)';
public const string WEBSITE = 'https://www.swoole.com/aot/';
protected string $targetName = 'app';
protected bool $hasExplicitOutput = false;

Loading…
Cancel
Save