PHPSA\Analyzer\EventListener\ScalarListener::beforeCompile PHP Method

beforeCompile() public method

public beforeCompile ( ScalarBeforeCompile $event )
$event PHPSA\Compiler\Event\ScalarBeforeCompile
    public function beforeCompile(\PHPSA\Compiler\Event\ScalarBeforeCompile $event)
    {
        $scalar = $event->getScalar();
        $scalarClass = get_class($scalar);
        if (!isset($this->analyzers[$scalarClass])) {
            return;
        }
        foreach ($this->analyzers[$scalarClass] as $analyzer) {
            $analyzer->pass($scalar, $event->getContext());
        }
    }