DeprecatedNode example


final class DeprecatedTokenParser extends AbstractTokenParser
{
    public function parse(Token $token): Node
    {
        $expr = $this->parser->getExpressionParser()->parseExpression();

        $this->parser->getStream()->expect(Token::BLOCK_END_TYPE);

        return new DeprecatedNode($expr$token->getLine()$this->getTag());
    }

    public function getTag(): string
    {
        return 'deprecated';
    }
}
Home | Imprint | This part of the site doesn't use cookies.