final | |
---|---|
extends |
TokenEmulator |
Methods | ||
---|---|---|
public
|
getPhpVersion(): string
|
# |
public
|
isEmulationNeeded(string $code): bool
|
# |
public
|
emulate(string $code, array $tokens): array
|
# |
public
|
reverseEmulate(string $code, array $tokens): array
|
# |
Methods inherited from PhpParser\Lexer\TokenEmulator\TokenEmulator |
---|
preprocessCode() |
Constants | ||
---|---|---|
public
|
BIN = '(?:0b[01]+(?:_[01]+)*)'
|
# |
public
|
HEX = '(?:0x[0-9a-f]+(?:_[0-9a-f]+)*)'
|
# |
public
|
DEC = '(?:[0-9]+(?:_[0-9]+)*)'
|
# |
public
|
SIMPLE_FLOAT = '(?:' . self::DEC . '\.' . self::DEC . '?|\.' . self::DEC . ')'
|
# |
public
|
EXP = '(?:e[+-]?' . self::DEC . ')'
|
# |
public
|
FLOAT = '(?:' . self::SIMPLE_FLOAT . self::EXP . '?|' . self::DEC . self::EXP . ')'
|
# |
public
|
NUMBER = '~' . self::FLOAT . '|' . self::BIN . '|' . self::HEX . '|' . self::DEC . '~iA'
|
# |