mirror of
https://github.com/phabelio/PHP-Parser.git
synced 2025-01-22 13:21:12 +01:00
22 lines
478 B
PHP
22 lines
478 B
PHP
<?php declare(strict_types=1);
|
|
|
|
namespace PhpParser\Lexer\TokenEmulator;
|
|
|
|
/** @internal */
|
|
interface TokenEmulatorInterface
|
|
{
|
|
public function getPhpVersion(): string;
|
|
|
|
public function isEmulationNeeded(string $code): bool;
|
|
|
|
/**
|
|
* @return array Modified Tokens
|
|
*/
|
|
public function emulate(string $code, array $tokens): array;
|
|
|
|
/**
|
|
* @return array Modified Tokens
|
|
*/
|
|
public function reverseEmulate(string $code, array $tokens): array;
|
|
}
|