/** * Parses '<<', '@@'... * * {@inheritdoc} */ public function parse(Token $token) : string { $value = $token->getValue(); if ('' === $value) { throw ExpressionLanguageExceptionFactory::createForUnparsableToken($token); } return $this->tokenizer->detokenize(substr($value, 1)); }
/** * Parses expressions such as '<(something)>'. * * {@inheritdoc} * * @throws ParseException */ public function parse(Token $token) { $value = $this->tokenizer->detokenize($token->getValue()); $realValue = preg_replace('/^<\\((.*)\\)>$/', '<identity($1)>', $value); return $this->decoratedTokenParser->parse(new Token($realValue, new TokenType(TokenType::FUNCTION_TYPE))); }