Searched refs:emulator (Results 1 – 2 of 2) sorted by relevance
12 private TokenEmulator $emulator; variable in PhpParser\\Lexer\\TokenEmulator\\ReverseEmulator14 public function __construct(TokenEmulator $emulator) { argument15 $this->emulator = $emulator;19 return $this->emulator->getPhpVersion();23 return $this->emulator->isEmulationNeeded($code);27 return $this->emulator->reverseEmulate($code, $tokens);31 return $this->emulator->emulate($code, $tokens);
54 foreach ($emulators as $emulator) {55 $emulatorPhpVersion = $emulator->getPhpVersion();57 $this->emulators[] = $emulator;59 $this->emulators[] = new ReverseEmulator($emulator);65 $emulators = array_filter($this->emulators, function ($emulator) use ($code) {66 return $emulator->isEmulationNeeded($code);79 foreach ($emulators as $emulator) {80 $code = $emulator->preprocessCode($code, $this->patches);96 foreach ($emulators as $emulator) {97 $tokens = $emulator->emulate($code, $tokens);
Completed in 5 milliseconds