protected function lexBlock()
{
$tokens = array();
$match = null;
if (preg_match('/(\\s*)(' . preg_quote(self::BLOCK_END_TRIM) . '|' . preg_quote(self::BLOCK_END) . ')/A', $this->source, $match, null, $this->cursor)) {
if ($match[2] == self::BLOCK_END_TRIM) {
$this->trim = true;
}
$this->cursor += strlen($match[0]);
$this->adjustLineChar($match[1]);
$tokens[] = new Token(Token::BLOCK_END, $match[2], $this->line, $this->char);
$this->adjustLineChar($match[2]);
$this->position = self::POSITION_TEXT;
return $tokens;
}
return $this->lexExpression();
}