Go\Core\AbstractAspectLoaderExtension::makeLexicalAnalyze PHP Method

makeLexicalAnalyze() protected method

Performs lexical analyze of pointcut
protected makeLexicalAnalyze ( Go\Aop\Aspect $aspect, ReflectionMetho\ReflectionMethod | ReflectionPropert\ReflectionProperty $reflection, BaseAnnotation $metaInformation ) : Dissect\Lexer\TokenStream\TokenStream
$aspect Go\Aop\Aspect Instance of aspect
$reflection ReflectionMetho\ReflectionMethod | ReflectionPropert\ReflectionProperty
$metaInformation Go\Lang\Annotation\BaseAnnotation
return Dissect\Lexer\TokenStream\TokenStream
    protected function makeLexicalAnalyze(Aspect $aspect, $reflection, $metaInformation)
    {
        try {
            $resolvedThisPointcut = str_replace('$this', get_class($aspect), $metaInformation->value);
            $stream = $this->pointcutLexer->lex($resolvedThisPointcut);
        } catch (RecognitionException $e) {
            $message = "Can not recognize the lexical structure `%s` before %s, defined in %s:%d";
            $message = sprintf($message, $metaInformation->value, (isset($reflection->class) ? $reflection->class . '->' : '') . $reflection->name, method_exists($reflection, 'getFileName') ? $reflection->getFileName() : $reflection->getDeclaringClass()->getFileName(), method_exists($reflection, 'getStartLine') ? $reflection->getStartLine() : 0);
            throw new \UnexpectedValueException($message, 0, $e);
        }
        return $stream;
    }