- Updated namespace declarations from PhpAot\Php to TypePhp in all source files - Modified import statements to use TypePhp instead of PhpAot\Php throughout the codebase - Adjusted composer.json autoload configuration to map TypePhp namespace to src directories - Updated documentation references from PhpAot\Php to TypePhp in comments and markdown files - Changed class references in test files to use new TypePhp namespace - Updated bootstrap and utility scripts to reference TypePhp namespace - Removed abstract base class inheritance in CompilerBase class - Added new properties and methods for indentation and mode handling in CompilerBase - Updated exception handling to use new TypePhp\Exception namespacepull/15/head
parent
da0707e4d0
commit
8ac4c5872d
122 changed files with 387 additions and 418 deletions
@ -1,4 +1,4 @@ |
||||
<?php |
||||
require __DIR__ . '/bootstrap.php'; |
||||
$r = \PhpAot\Php\Reflection::getFunctionParameter('array_push', 0); |
||||
$r = \TypePhp\Reflection::getFunctionParameter('array_push', 0); |
||||
var_dump($r->isPassedByReference()); |
||||
@ -1,61 +0,0 @@ |
||||
<?php |
||||
|
||||
namespace PhpAot\Core; |
||||
|
||||
abstract class Translator |
||||
{ |
||||
protected int $indentLevel = 0; |
||||
protected string $indentStr = "\t"; |
||||
public string $mode = 'cli'; |
||||
protected string $lang; |
||||
protected string $osType = 'linux'; |
||||
|
||||
public function __construct() |
||||
{ |
||||
$this->osType = PHP_OS_FAMILY; |
||||
} |
||||
|
||||
public function isMacos(): bool |
||||
{ |
||||
return $this->osType === 'Darwin'; |
||||
} |
||||
|
||||
public function isLinux(): bool |
||||
{ |
||||
return $this->osType === 'Linux'; |
||||
} |
||||
|
||||
public function isWindows(): bool |
||||
{ |
||||
return $this->osType === 'Windows'; |
||||
} |
||||
|
||||
public function setMode($mode): void |
||||
{ |
||||
$this->mode = $mode; |
||||
} |
||||
|
||||
public function setIndent(string $indent): void |
||||
{ |
||||
$this->indentStr = $indent; |
||||
} |
||||
|
||||
public function setIndentLevel(int $level): void |
||||
{ |
||||
$this->indentLevel = $level; |
||||
} |
||||
|
||||
public function getLang(): string |
||||
{ |
||||
return $this->lang; |
||||
} |
||||
|
||||
abstract public function getLine($node): int; |
||||
|
||||
abstract public function getType($node): string; |
||||
|
||||
protected function getIndent(): string |
||||
{ |
||||
return str_repeat($this->indentStr, $this->indentLevel); |
||||
} |
||||
} |
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue