src/Jade/Lexer.php
protected function scan($regex, $type)
    {
        if (preg_match($regex, $this->input, $matches)) {
            $this->consume($matches[0]);

            return $this->token($type, isset($matches[1]) && mb_strlen($matches[1]) > 0 ? $matches[1] : '');
        }
    }
protected function scan($regex, $type)
    {
        if (preg_match($regex, $this->input, $matches)) {
            $this->consume($matches[0]);

            return $this->token($type, isset($matches[1]) && mb_strlen($matches[1]) > 0 ? $matches[1] : '');
        }
    }
protected function scan ( $ regex , $ type ) { if ( preg_match ( $ regex , $ this -> input , $ matches ) ) { $ this -> consume ( $ matches [ 0 ] ) ; return $ this -> token ( $ type , isset ( $ matches [ 1 ] ) && mb_strlen ( $ matches [ 1 ] ) > 0 ? $ matches [ 1 ] : '' ) ; } }
Helper to create tokens
Helper to create tokens