Parentheses in for loop - doesn't parse

The below for loop triggers a "Cannot parse" Exception. I was expecting this sytax to work as parentheses parse fine with if statements and while loops. Is this intended functionality or a bug?

Thanks, Phil

namespace Utils;

class ForParentheses
{

    public function alpha(string $str)
    {
        char $ch;

        for ($ch in $str) {
            echo $ch, "\n";
        }
    }
}

[email protected]:~/zephir/utils$ zephir build Zephir\Exception: Cannot parse file: /home/vagrant/zephir/utils/utils/forparentheses.zep

edited Apr '17

In most cases (99.99%) parentheses does not needed. In the same way as the sign $.

namespace Utils;

class ForWithoutParentheses
{
    public function alpha(string str) -> void
    {
        char ch;

        for ch in str {
            echo ch, "\n";
        }
    }
}

Could you show at least one example when parentheses are required in for?

I understand that parentheses are not needed and I do not have an example where they are required. For me using parentheses and dollar signs is a preference.

The Phalcon team has done an awesome job of making Zephir look and feel like PHP. Which is why I'd like to use Zehpir to build complex components which mid-level PHP developers can maintain without being intimidated by a different syntax.

Could you please open an issue with script to reproduce: https://github.com/phalcon/php-zephir-parser

I'll take a look ASAP.

Does this issue go in php-zephir-parser or in phalcon/zephir? I built zephir via: git clone https://github.com/phalcon/zephir

edited Apr '17

Let's think rationally. Do you think that maybe there is a problem with parsing. Right? I need to test it.