Twig_Lexer::lexBlock PHP Method

lexBlock() protected method

protected lexBlock ( )
    protected function lexBlock()
    {
        if (preg_match('/\s*'.preg_quote($this->options['tag_block'][1], '/').'/As', $this->code, $match, null, $this->cursor)) {
            $lineno = $this->lineno;
            $this->moveCursor($match[0]);
            $this->moveLineNo($match[0]);
            $this->position = self::POSITION_DATA;

            return new Twig_Token(Twig_Token::BLOCK_END_TYPE, '', $lineno);
        }

        return $this->lexExpression();
    }