private function run($compiler, $string)
    {
        $compiler = $this->getCompilerInstance($compiler);

        return preg_replace_callback($compiler->getPattern(), function ($matches) use ($compiler) {
            return $compiler->compile($matches);
        }, $string);
    }