lexExpression() protected méthode

protected lexExpression ( )
Exemple #1
0
 protected function lexExpression()
 {
     // collect whitespaces and new lines
     if (preg_match('/\\s+/A', $this->code, $match, null, $this->cursor)) {
         $emptyLines = explode("\n", $match[0]);
         foreach ($emptyLines as $line) {
             if (strlen($line) == 0) {
                 $this->pushToken(Token::NEWLINE_TYPE);
             } else {
                 $this->pushToken(Token::WHITESPACE_TYPE, $line);
             }
         }
     }
     parent::lexExpression();
 }